Guest User

Untitled

a guest
Dec 13th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. const path = require('path')
  2. const webpack = require('webpack')
  3. const htmlWebpackPlugin = require('html-webpack-plugin')
  4.  
  5. module.exports = {
  6. entry: {
  7. app: './src/main.js',
  8. moduleA: './src/moduleA.js',
  9. moduleB: './src/moduleB.js',
  10. moduleC: './src/moduleC.js'
  11. },
  12. output: {
  13. path: path.resolve(__dirname, './dist'),
  14. filename: '[name].js'
  15. },
  16. plugins: [
  17. new htmlWebpackPlugin({
  18. title: 'Webpack CommonsChunkPlugin'
  19. }),
  20. new webpack.optimize.CommonsChunkPlugin({
  21. name: 'self.lodash.vendor',
  22. chunks: ['moduleA', 'moduleB']
  23. })
  24. ]
  25. }
Add Comment
Please, Sign In to add comment