Skip to content

Commit

Permalink
revert webpacker settings
Browse files Browse the repository at this point in the history
  • Loading branch information
kaishuu0123 committed Oct 18, 2019
1 parent 474af80 commit 6c6b1d3
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions config/webpack/environment.js
Expand Up @@ -4,28 +4,30 @@ const webpack = require('webpack')
const vue = require('./loaders/vue')

// enable SplitChunks
environment.splitChunks((config) => {
return Object.assign({}, config, {
optimization: {
splitChunks: {
cacheGroups: {
vendor: {
test:/node_modules/,
name: 'vendor',
chunks: 'initial',
enforce: true
},
rebacklogsCommons: {
test: /app\/javascript\/commons/,
name: 'rebacklogs-commons',
chunks: 'initial',
enforce: true
}
}
}
}
})
})
environment.splitChunks()

// FIXME:
// environment.splitChunks((config) => {
// return Object.assign({}, config, {
// optimization: {
// splitChunks: {
// cacheGroups: {
// vendor: {
// test:/node_modules/,
// name: 'vendor',
// chunks: 'initial',
// enforce: true
// },
// vendorCommons: {
// test: /app\/javascript\/commons/,
// name: 'vendor-commons',
// chunks: 'initial'
// }
// }
// }
// }
// })
// })

environment.plugins.append('Provide', new webpack.ProvidePlugin({
$: 'jquery',
Expand Down

0 comments on commit 6c6b1d3

Please sign in to comment.