houdini/config/webpack/production.js

23 lines
741 B
JavaScript
Raw Normal View History

2019-11-05 22:39:13 +00:00
process.env.NODE_ENV = process.env.NODE_ENV || 'production'
const environment = require('./environment')
environment.splitChunks((config) => {
const excludeDonateButtonFromSplit = {
optimization:
{
splitChunks:
{
chunks(chunk) {
// donate-button-v2 can never be split. So don't
return chunk.name !== 'donate-button-v2'
}
},
// we can't have the donate-button-v2 ONLY include runtimeChunk
// so we never split it out. 🙁
runtimeChunk: false
},
}
return Object.assign({}, config, excludeDonateButtonFromSplit)
})
2019-11-05 22:39:13 +00:00
module.exports = environment.toWebpackConfig()