|
@@ -79,39 +79,13 @@ module.exports = {
|
|
|
const types = ['vue-modules', 'vue', 'normal-modules', 'normal']
|
|
|
types.forEach(type => addStyleResource(config.module.rule('scss').oneOf(type)))
|
|
|
|
|
|
- config.optimization.splitChunks({
|
|
|
- chunks: 'all',
|
|
|
- cacheGroups: {
|
|
|
- vendors: {
|
|
|
- name: 'chunk-vendors',
|
|
|
- test: /[\\/]node_modules[\\/]/,
|
|
|
- chunks: 'all',
|
|
|
- priority: 2,
|
|
|
- reuseExistingChunk: true,
|
|
|
- enforce: true
|
|
|
- },
|
|
|
- vantUi: {
|
|
|
- name: 'chunk-vantUi',
|
|
|
- test: /[\\/]node_modules[\\/]vant[\\/]/,
|
|
|
- chunks: 'all',
|
|
|
- priority: 3,
|
|
|
- reuseExistingChunk: true,
|
|
|
- enforce: true
|
|
|
- },
|
|
|
- commons: {
|
|
|
- name: 'chunk-commons',
|
|
|
- test: resolve('src/components'), // can customize your rules
|
|
|
- minChunks: 3, // minimum common number
|
|
|
- priority: 5,
|
|
|
- reuseExistingChunk: true
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
config.plugin('define').tap(args => {
|
|
|
args[0]['process.env'] = Object.assign({}, args[0]['process.env'], env)
|
|
|
return args
|
|
|
})
|
|
|
+
|
|
|
+ config.plugins.delete('preload')
|
|
|
+ config.plugins.delete('prefetch')
|
|
|
},
|
|
|
css: {
|
|
|
extract: {
|