diff --git a/lib/builder/webpack/base.config.js b/lib/builder/webpack/base.config.js index ccb894ebd3..e7396fe027 100644 --- a/lib/builder/webpack/base.config.js +++ b/lib/builder/webpack/base.config.js @@ -1,11 +1,11 @@ -import ExtractTextPlugin from 'extract-text-webpack-plugin' -import { defaults, cloneDeep } from 'lodash' -import { join, resolve } from 'path' -import webpack from 'webpack' -import { isUrl, urlJoin } from 'utils' -import autoprefixer from 'autoprefixer' -import vueLoaderConfig from './vue-loader.config' -import { styleLoader, extractStyles } from './helpers' +import ExtractTextPlugin from "extract-text-webpack-plugin"; +import { cloneDeep, defaults } from "lodash"; +import { join, resolve } from "path"; +import webpack from "webpack"; +import { isUrl, urlJoin } from "utils"; +import autoprefixer from "autoprefixer"; +import vueLoaderConfig from "./vue-loader.config"; +import { extractStyles, styleLoader } from "./helpers"; /* |-------------------------------------------------------------------------- @@ -136,6 +136,11 @@ export default function webpackBaseConfig ({ isClient, isServer }) { minimize: true }) ) + + // Scope Hoisting + config.plugins.push( + new webpack.optimize.ModuleConcatenationPlugin() + ) } // Clone deep avoid leaking config between Client and Server