Guest User

Untitled

a guest
Dec 14th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. module.exports = function () {
  2. return {
  3. entry: {
  4. admin_app: exposePath('AdminApp', 'Components'),
  5. user_app: exposePath('UserApp', 'Components')
  6. },
  7. output: {
  8. path: paths.CLIENT_BUILD_PATH,
  9. filename: '[name].client.bundle.js',
  10. sourceMapFilename: 'maps/[name].client.map.js',
  11. chunkFilename: "chunks/[name].client.chunk.js"
  12. },
  13. /*plugins: [ // plugins from webpack 3
  14. new webpack.optimize.CommonsChunkPlugin({
  15. name: 'vendor',
  16. minChunks: function (module) {
  17. return module.context && module.context.indexOf('node_modules') !== -1;
  18. }
  19. }),
  20. new webpack.optimize.CommonsChunkPlugin({
  21. name: 'manifest',
  22. minChunks: Infinity
  23. })
  24. ]
  25. */
  26. optimization: { // so the code will be written on top (Webpack 4)
  27. splitChunks: {
  28. cacheGroups: {
  29. vendor: {
  30. name: 'vendor',
  31. test(module) {
  32. return module.context && module.context.indexOf('node_modules') !== -1;
  33. }
  34. },
  35.  
  36. manifest: {
  37. name: 'manifest',
  38. minChunks: Infinity
  39. }
  40. }
  41. }
  42. }
  43. };
  44. };
Add Comment
Please, Sign In to add comment