webpack3: Scope Hoisting

This commit is contained in:
Pooya Parsa 2017-06-19 23:45:59 +04:30
parent 4f9684e117
commit 8378a772e5

View File

@ -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