Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = function () {
- return {
- entry: {
- admin_app: exposePath('AdminApp', 'Components'),
- user_app: exposePath('UserApp', 'Components')
- },
- output: {
- path: paths.CLIENT_BUILD_PATH,
- filename: '[name].client.bundle.js',
- sourceMapFilename: 'maps/[name].client.map.js',
- chunkFilename: "chunks/[name].client.chunk.js"
- },
- /*plugins: [ // plugins from webpack 3
- new webpack.optimize.CommonsChunkPlugin({
- name: 'vendor',
- minChunks: function (module) {
- return module.context && module.context.indexOf('node_modules') !== -1;
- }
- }),
- new webpack.optimize.CommonsChunkPlugin({
- name: 'manifest',
- minChunks: Infinity
- })
- ]
- */
- optimization: { // so the code will be written on top (Webpack 4)
- splitChunks: {
- cacheGroups: {
- vendor: {
- name: 'vendor',
- test(module) {
- return module.context && module.context.indexOf('node_modules') !== -1;
- }
- },
- manifest: {
- name: 'manifest',
- minChunks: Infinity
- }
- }
- }
- }
- };
- };
Add Comment
Please, Sign In to add comment