mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-06 20:06:43 +08:00
61 lines
1.7 KiB
JavaScript
61 lines
1.7 KiB
JavaScript
/*
|
|
* @Author: jiawei jia.wei@ebiz-digits.com
|
|
* @Date: 2023-03-01 17:02:34
|
|
* @LastEditors: jiawei jia.wei@ebiz-digits.com
|
|
* @LastEditTime: 2023-03-01 17:02:56
|
|
* @FilePath: \ebiz-h5\vue.config.js
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
*/
|
|
const autoprefixer = require('autoprefixer')
|
|
const pxtoviewport = require('postcss-px-to-viewport')
|
|
const TerserPlugin = require("terser-webpack-plugin");
|
|
|
|
module.exports = {
|
|
publicPath: process.env.NODE_ENV === 'production' ? '/' : '/',
|
|
lintOnSave: process.env.NODE_ENV === 'development', //是否开启代码检查
|
|
outputDir: 'dist', //打包输出目录
|
|
productionSourceMap: false,
|
|
css: {
|
|
loaderOptions: {
|
|
postcss: {
|
|
plugins: [
|
|
autoprefixer(),
|
|
pxtoviewport({
|
|
viewportWidth: 375,
|
|
// 该项仅在使用 Circle 组件时需要
|
|
// 原因参见 https://github.com/youzan/vant/issues/1948
|
|
selectorBlackList: ['van-circle__layer']
|
|
})
|
|
]
|
|
}
|
|
}
|
|
},
|
|
chainWebpack: config => {
|
|
// 移除 prefetch 插件
|
|
config.plugins.delete('prefetch')
|
|
// // 压缩代码
|
|
// config.optimization.minimize(true)
|
|
// // 分割代码
|
|
// config.optimization.splitChunks({
|
|
// chunks: 'all',
|
|
// })
|
|
},
|
|
devServer: {
|
|
port: 8082
|
|
},
|
|
configureWebpack: {
|
|
optimization: {
|
|
minimizer: [
|
|
new TerserPlugin({
|
|
terserOptions: {
|
|
output: {
|
|
comments: false
|
|
}
|
|
},
|
|
extractComments: false
|
|
})
|
|
]
|
|
}
|
|
},
|
|
}
|