Skip to content

Commit abb3321

Browse files
docs: Updated info about the optimization object (faceyspacey#91)
Informed users that the optimization object used here is just an example, and more complex and aggressive splitting is an option as well
1 parent bc0fcbc commit abb3321

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ yarn add --dev extract-css-chunks-webpack-plugin babel-plugin-universal-import
139139
The main thing is you need to cater to the new chunking system of webpack!
140140
With **webpack.optimize.CommonsChunkPlugin** plugin no longer part of Webpack 4, we need another way to define the code-splitting. Luckily we have `optimization` configs built into webpack now
141141

142+
> There are more aggressive ways to code split, thanks to webpack 4. Check out the RUC Readme if you are looking for a more aggressive code split optimization configuration. These are just examples, you should be able to configure them as you see fit
143+
142144
*webpack.config.js:*
143145
```js
144146
const ExtractCssChunks = require("extract-css-chunks-webpack-plugin")
@@ -182,7 +184,7 @@ module.exports = {
182184
name: 'bootstrap'
183185
},
184186
splitChunks: {
185-
chunks: 'initial', // <-- The key to this
187+
chunks: 'initial',
186188
cacheGroups: {
187189
vendors: {
188190
test: /[\\/]node_modules[\\/]/,

0 commit comments

Comments
 (0)