9901ceaa by renchao@pashanhoo.com

style:监管问题修改

1 parent 241897bb
'use strict'
const path = require('path')
const defaultSettings = require('./src/settings.js')
function resolve (dir) {
return path.join(__dirname, dir)
}
const name = process.env.TITLE
const port = process.env.port || process.env.npm_config_port || 8888 // dev port
// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {
/**
......@@ -45,7 +48,7 @@ module.exports = {
}
},
css: {
extract: false, // 是否使用css分离插件 ExtractTextPlugin
extract: true, // 是否使用css分离插件 ExtractTextPlugin
sourceMap: false, // 开启 CSS source maps?
loaderOptions: {
sass: {
......@@ -56,21 +59,22 @@ module.exports = {
},
// configureWebpack通过操作对象的形式,来修改默认的webpack配置
configureWebpack: {
name: name,
externals: [{
'./cptable': 'var cptable'
}],
optimization: {
usedExports: true,
minimize: true
},
entry: {
app: './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) {
config.entry.app = ['babel-polyfill', './src/main.js'];
// it can improve the speed of the first screen, it is recommended to turn on preload
// it can improve the speed of the first screen, it is recommended to turn on preload
config.plugin('preload').tap(() => [
{
......@@ -81,7 +85,6 @@ module.exports = {
include: 'initial'
}
])
// when there are many pages, it will cause too many meaningscss requests
config.plugins.delete('prefetch')
config.module
......