This commit is contained in:
2023-05-05 09:40:23 +08:00
parent 9a14b99b18
commit 054e739905
25 changed files with 1684 additions and 1480 deletions

View File

@@ -25,7 +25,7 @@ module.exports = {
assetsDir: 'static',
// 是否开启eslint保存检测有效值ture | false | 'error'
lintOnSave: process.env.NODE_ENV === 'development',
// 如果你不需要生产环境的 source map可以将其设置为 false 以加速生产环境构建。
// 如果你不需要生产环境的 source map可以将其设置为 false 以加速生产环境构建。rrra
productionSourceMap: false,
// webpack-dev-server 相关配置
devServer: {
@@ -35,8 +35,8 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://118.31.23.45/duima/`,
// target: `http://localhost:8086`,
// target: `http://118.31.23.45/duima/`,
target: `http://localhost:8086`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
@@ -97,12 +97,10 @@ module.exports = {
config
.plugin('ScriptExtHtmlWebpackPlugin')
.after('html')
.use('script-ext-html-webpack-plugin', [
{
// `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}
])
.use('script-ext-html-webpack-plugin', [{
// `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}])
.end();
config.optimization.splitChunks({
chunks: 'all',