优化环境域名切换
This commit is contained in:
+19
-16
@@ -1,9 +1,10 @@
|
||||
const path = require('path')
|
||||
module.exports = {
|
||||
env: {
|
||||
NODE_ENV: '"development"'
|
||||
NODE_ENV: '"development"',
|
||||
},
|
||||
defineConstants: {
|
||||
CURRENT_BASE_URL: '"https://test.zzfzyc.com/lymarket"',
|
||||
},
|
||||
mini: {
|
||||
// optimizeMainPackage: {
|
||||
@@ -14,28 +15,30 @@ module.exports = {
|
||||
plugin: {
|
||||
install: {
|
||||
plugin: require('terser-webpack-plugin'),
|
||||
args: [{
|
||||
terserOptions: {
|
||||
compress: true, // 默认使用terser压缩
|
||||
// compress: {
|
||||
// drop_console: true, // 去掉打印
|
||||
// }, // 默认使用terser压缩
|
||||
// mangle: false,
|
||||
keep_classnames: true, // 不改变class名称
|
||||
keep_fnames: true // 不改变函数名称
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
args: [
|
||||
{
|
||||
terserOptions: {
|
||||
compress: true, // 默认使用terser压缩
|
||||
// compress: {
|
||||
// drop_console: true, // 去掉打印
|
||||
// }, // 默认使用terser压缩
|
||||
// mangle: false,
|
||||
keep_classnames: true, // 不改变class名称
|
||||
keep_fnames: true, // 不改变函数名称
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
h5: {},
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, '..', 'src'),
|
||||
},
|
||||
sass: {
|
||||
resource: path.resolve(__dirname, '..', 'src/styles/common.scss')
|
||||
resource: path.resolve(__dirname, '..', 'src/styles/common.scss'),
|
||||
},
|
||||
// plugins: [
|
||||
// '@tarojs/plugin-react-devtools'
|
||||
|
||||
+3
-1
@@ -3,7 +3,9 @@ module.exports = {
|
||||
env: {
|
||||
NODE_ENV: '"pre"',
|
||||
},
|
||||
defineConstants: {},
|
||||
defineConstants: {
|
||||
CURRENT_BASE_URL: '"https://pre.zzfzyc.com/lymarket"',
|
||||
},
|
||||
mini: {
|
||||
optimizeMainPackage: {
|
||||
enable: true,
|
||||
|
||||
+3
-1
@@ -3,7 +3,9 @@ module.exports = {
|
||||
env: {
|
||||
NODE_ENV: '"production"',
|
||||
},
|
||||
defineConstants: {},
|
||||
defineConstants: {
|
||||
CURRENT_BASE_URL: '"https://www.zzfzyc.com/lymarket"',
|
||||
},
|
||||
mini: {
|
||||
optimizeMainPackage: {
|
||||
enable: true,
|
||||
|
||||
Reference in New Issue
Block a user