9db71c4d by renchao@pashanhoo.com

style;打包配置修改

1 parent 2f75ba5d
......@@ -49,7 +49,7 @@ module.exports = {
}
},
css: {
extract: false, // 是否使用css分离插件 ExtractTextPlugin
extract: true, // 是否使用css分离插件 ExtractTextPlugin
sourceMap: false, // 开启 CSS source maps?
loaderOptions: {
sass: {
......@@ -61,15 +61,13 @@ module.exports = {
// configureWebpack通过操作对象的形式,来修改默认的webpack配置
configureWebpack: {
name: name,
entry: {
app: './src/main.js'
},
entry: './src/main.js',
resolve: {
alias: {
'@': resolve('src')
}
},
devtool: '#eval-source-map' //测试
devtool: process.env.NODE_ENV === 'development' ? '#eval-source-map' : false
},
// chainWebpack通过链式编程的形式,来修改默认的webpack配置
chainWebpack (config) {
......@@ -84,8 +82,8 @@ module.exports = {
include: 'initial'
}
])
// when there are many pages, it will cause too many meaningscss requests
config.plugins.delete('prefetch')
config.module
.rule('svg')
.exclude.add(resolve('src/image/icons'))
......