...
 
Commits (2)
......@@ -8,44 +8,16 @@ const isCoverage = process.env.npm_lifecycle_event && process.env.npm_lifecycle_
const isUnitTesting = process.env.npm_lifecycle_event && process.env.npm_lifecycle_event === 'test:unit'
const isE2ETesting = process.env.npm_lifecycle_event && process.env.npm_lifecycle_event === 'test:e2e'
const chunks = {
vue: {
test: /\/node_modules\/@?vue\//,
enforce: true,
name: 'vue'
},
elementui: {
test: /\/node_modules\/element-ui\//,
name: 'elementui'
},
fontawesome: {
test: /\/node_modules\/\fortawesome\//,
enforce: true,
name: 'fontawesome'
},
lodash: {
test: /\/node_modules\/lodash\//,
name: 'lodash'
},
vendor: {
test: /\/node_modules\//,
priority: -10,
name: 'vendor'
}
}
module.exports = {
pages: {
index: {
entry: 'src/index.js',
template: 'src/index.html',
title: 'salp',
chunks: Object.keys(chunks).map(key => chunks[key].name || key).concat('index')
title: 'salp'
},
about: {
entry: 'src/about.js',
template: 'src/about.html',
chunks: ['vue', 'elementui', 'vendor', 'about']
template: 'src/about.html'
}
},
chainWebpack: config => {
......