ocr刷新
This commit is contained in:
+11
-11
@@ -1,5 +1,5 @@
|
||||
const path = require('path')
|
||||
const CompressionPlugin = require("compression-webpack-plugin")
|
||||
const CompressionPlugin = require('compression-webpack-plugin')
|
||||
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, dir)
|
||||
@@ -14,10 +14,10 @@ module.exports = {
|
||||
*/
|
||||
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
|
||||
productionSourceMap: false,
|
||||
//打包app时放开该配置
|
||||
//publicPath:'./',
|
||||
// 打包app时放开该配置
|
||||
// publicPath:'./',
|
||||
configureWebpack: config => {
|
||||
//生产环境取消 console.log
|
||||
// 生产环境取消 console.log
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true
|
||||
}
|
||||
@@ -30,7 +30,7 @@ module.exports = {
|
||||
.set('@comp', resolve('src/components'))
|
||||
.set('@views', resolve('src/views'))
|
||||
|
||||
//生产环境,开启js\css压缩
|
||||
// 生产环境,开启js\css压缩
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
config.plugin('compressionPlugin').use(new CompressionPlugin({
|
||||
test: /\.(js|css|less)$/, // 匹配文件名
|
||||
@@ -63,7 +63,6 @@ module.exports = {
|
||||
.use()
|
||||
.loader('babel-loader')
|
||||
.end()
|
||||
|
||||
},
|
||||
|
||||
css: {
|
||||
@@ -73,9 +72,9 @@ module.exports = {
|
||||
/* less 变量覆盖,用于自定义 ant design 主题 */
|
||||
'primary-color': '#00B3BE',
|
||||
'link-color': '#00B3BE',
|
||||
'border-radius-base': '4px',
|
||||
'border-radius-base': '4px'
|
||||
},
|
||||
javascriptEnabled: true,
|
||||
javascriptEnabled: true
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -90,14 +89,15 @@ module.exports = {
|
||||
pathRewrite: {
|
||||
'/jero-boot': '' //默认所有请求都加了jero-boot前缀,需要去掉
|
||||
}
|
||||
},*/
|
||||
}, */
|
||||
'/jero-boot': {
|
||||
target: 'http://localhost:8080', //请求本地 jero-boot后台项目
|
||||
// target: 'http://10.0.1.25:8080',
|
||||
ws: false,
|
||||
changeOrigin: true
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
lintOnSave: undefined
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user