feat:导出 压缩包

This commit is contained in:
zhangyu
2022-04-11 15:49:10 +08:00
parent 051f0a776c
commit 9dac000608
15 changed files with 97009 additions and 1241 deletions

View File

@@ -25,8 +25,8 @@ const devWebpackConfig = merge(baseWebpackConfig, {
clientLogLevel: 'warning',
historyApiFallback: {
rewrites: [
{ from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
],
{ from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') }
]
},
hot: true,
contentBase: false, // since we use CopyWebpackPlugin.
@@ -37,12 +37,12 @@ const devWebpackConfig = merge(baseWebpackConfig, {
overlay: config.dev.errorOverlay
? { warnings: false, errors: true }
: false,
publicPath: "/",
/*publicPath: config.dev.assetsPublicPath,*/
publicPath: '/',
/* publicPath: config.dev.assetsPublicPath, */
proxy: config.dev.proxyTable,
quiet: true, // necessary for FriendlyErrorsPlugin
watchOptions: {
poll: config.dev.poll,
poll: config.dev.poll
}
},
plugins: [
@@ -64,6 +64,11 @@ const devWebpackConfig = merge(baseWebpackConfig, {
from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory,
ignore: ['.*']
},
{
from: path.resolve(__dirname, '../src/components/chart'),
to: 'components/chart',
ignore: ['.*']
}
])
]
@@ -83,11 +88,11 @@ module.exports = new Promise((resolve, reject) => {
// Add FriendlyErrorsPlugin
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
compilationSuccessInfo: {
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`]
},
onErrors: config.dev.notifyOnErrors
? utils.createNotifierCallback()
: undefined
? utils.createNotifierCallback()
: undefined
}))
resolve(devWebpackConfig)