mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-07 04:16:44 +08:00
41 lines
1.1 KiB
JavaScript
41 lines
1.1 KiB
JavaScript
const autoprefixer = require('autoprefixer')
|
|
const pxtoviewport = require('postcss-px-to-viewport')
|
|
|
|
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.plugin('prefetch').tap(options => {
|
|
// options[0].fileBlacklist = options[0].fileBlacklist || []
|
|
// options[0].fileBlacklist.push(/myasyncRoute(.)+?\.js$/)
|
|
// return options
|
|
// })
|
|
},
|
|
devServer: {
|
|
// host:'localhost',
|
|
port: 8082
|
|
}
|
|
}
|