mirror of https://github.com/sgoudham/carbon.git
Use production build of React
Switch the temp strategy in `next.config.js` to use the production version of Reactmain
parent
b91a9d55dd
commit
6dfb5a4568
@ -1,8 +1,14 @@
|
|||||||
|
const Uglify = require('uglifyjs-webpack-plugin')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
// TODO remove `next.configs.js` when this closes: https://github.com/zeit/next.js/issues/1195
|
// TODO remove `next.configs.js` when this closes: https://github.com/zeit/next.js/issues/1195
|
||||||
webpack (cfg) {
|
webpack: function(c) {
|
||||||
cfg.plugins = cfg.plugins
|
c.plugins = c.plugins.filter(
|
||||||
.filter(plugin => (plugin.constructor.name !== 'UglifyJsPlugin'))
|
plugin => plugin.constructor.name !== 'UglifyJsPlugin'
|
||||||
return cfg
|
)
|
||||||
|
|
||||||
|
c.plugins.push(new Uglify())
|
||||||
|
|
||||||
|
return c
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue