splitted chunks for vue router pages, materialdesignicons styles
This commit is contained in:
@@ -25,11 +25,13 @@ module.exports = {
|
||||
'main': utils.resolve(themePath + '/assets/scripts/main.js'),
|
||||
// 'lang-en': utils.resolve(langPath + '/en.json'),
|
||||
'print': utils.resolve(themePath + '/assets/styles/print.scss')
|
||||
// 'mdi': utils.resolve(themePath + '/assets/styles/mdi/scss/materialdesignicons.scss')
|
||||
},
|
||||
output: {
|
||||
publicPath: '/themes/custom/materiotheme/assets/dist/',
|
||||
path: utils.resolve(themePath + '/assets/dist/'),
|
||||
filename: '[name].js',
|
||||
chunkFilename: '[name].js'
|
||||
chunkFilename: '[name].bundle.js'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
@@ -52,12 +54,12 @@ module.exports = {
|
||||
// type: 'javascript/auto',
|
||||
// loader: '@kazupon/vue-i18n-loader'
|
||||
// },
|
||||
{
|
||||
test: /\.js$/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
}
|
||||
},
|
||||
// {
|
||||
// test: /\.js$/,
|
||||
// use: {
|
||||
// loader: 'babel-loader',
|
||||
// }
|
||||
// },
|
||||
{
|
||||
test: /\.(graphql|gql)$/,
|
||||
exclude: /node_modules/,
|
||||
@@ -115,18 +117,23 @@ module.exports = {
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
vsa: {
|
||||
test: /[\\/]node_modules[\\/](vue-simple-accordion)[\\/]/,
|
||||
name: 'vsa',
|
||||
chunks: 'all',
|
||||
usedExports: true
|
||||
},
|
||||
// vsa: {
|
||||
// test: /[\\/]node_modules[\\/](vue-simple-accordion)[\\/]/,
|
||||
// name: 'vsa',
|
||||
// chunks: 'all',
|
||||
// usedExports: true
|
||||
// },
|
||||
vclb: {
|
||||
test: /[\\/]node_modules[\\/](vue-cool-lightbox)[\\/]/,
|
||||
name: 'vclb',
|
||||
chunks: 'all',
|
||||
usedExports: true
|
||||
},
|
||||
// vue_page_article: {
|
||||
// test: /[\\/]web[\\/]themes[\\/]custom[\\/]materiotheme[\\/]vuejs[\\/]components[\\/]Pages[\\/]Article.vue/,
|
||||
// name: 'vue_page_article',
|
||||
// chunks: 'all'
|
||||
// }
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user