Guest User

Untitled

a guest
Dec 14th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. diff --git a/webpack.config.js b/webpack.config.js
  2. index 4f0e5e5..d6f0479 100644
  3. --- a/webpack.config.js
  4. +++ b/webpack.config.js
  5. @@ -18,6 +18,15 @@ const plugins = [
  6. template: './src/ejs/index.ejs',
  7. title: 'React',
  8. }),
  9. + new webpack.NamedModulesPlugin(),
  10. + new webpack.optimize.CommonsChunkPlugin({
  11. + name: 'vendor',
  12. + minChunks: module => module.context && module.context.includes('node_modules'),
  13. + }),
  14. + new webpack.optimize.CommonsChunkPlugin({
  15. + name: 'manifest',
  16. + minChunks: Infinity,
  17. + }),
  18. ];
  19. if (DEBUG) {
  20. app.unshift(
  21. @@ -37,7 +46,7 @@ module.exports = {
  22. app,
  23. },
  24. output: {
  25. - filename: 'js/[name].bundle.js',
  26. + filename: 'js/[name].[chunkhash].bundle.js',
  27. path: path.resolve(__dirname, 'dist'),
  28. },
  29. module: {
Add Comment
Please, Sign In to add comment