41 lines
907 B
JavaScript
41 lines
907 B
JavaScript
const path = require('path')
|
|
module.exports = {
|
|
env: {
|
|
NODE_ENV: '"development"'
|
|
},
|
|
defineConstants: {
|
|
},
|
|
mini: {
|
|
// optimizeMainPackage: {
|
|
// enable: true
|
|
// },
|
|
webpackChain: (chain, webpack) => {
|
|
chain.merge({
|
|
plugin: {
|
|
install: {
|
|
plugin: require('terser-webpack-plugin'),
|
|
args: [{
|
|
terserOptions: {
|
|
compress: 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')
|
|
},
|
|
// plugins: [
|
|
// '@tarojs/plugin-react-devtools'
|
|
// ],
|
|
}
|