diff --git a/lib/builder/webpack/client.config.js b/lib/builder/webpack/client.config.js index 4d4be07f98..1083478028 100644 --- a/lib/builder/webpack/client.config.js +++ b/lib/builder/webpack/client.config.js @@ -38,9 +38,6 @@ module.exports = function webpackClientConfig() { config.devtool = this.options.dev ? 'cheap-source-map' : false config.output.devtoolModuleFilenameTemplate = '[absolute-resource-path]' - // Add CommonChunks plugin - commonChunksPlugin.call(this, config) - // Env object defined in nuxt.config.js let env = {} each(this.options.env, (value, key) => { @@ -78,15 +75,6 @@ module.exports = function webpackClientConfig() { }) ) - // Extract webpack runtime & manifest - config.plugins.push( - new webpack.optimize.CommonsChunkPlugin({ - name: 'manifest', - minChunks: Infinity, - filename: this.getFileName('manifest') - }) - ) - // Define Env config.plugins.push( new webpack.DefinePlugin( @@ -233,28 +221,6 @@ module.exports = function webpackClientConfig() { return config } -// -------------------------------------------------------------------------- -// Adds Common Chunks Plugin -// -------------------------------------------------------------------------- -function commonChunksPlugin(config) { - // Create explicit vendor chunk - config.plugins.unshift( - new webpack.optimize.CommonsChunkPlugin({ - name: 'vendor', - filename: this.getFileName('vendor'), - minChunks(module, count) { - // A module is extracted into the vendor chunk when... - return ( - // If it's inside node_modules - /node_modules/.test(module.context) && - // Do not externalize if the request is a CSS file or a Vue file which can potentially emit CSS assets! - !/\.(css|less|scss|sass|styl|stylus|vue)$/.test(module.request) - ) - } - }) - ) -} - // -------------------------------------------------------------------------- // Adds DLL plugin // https://github.com/webpack/webpack/tree/master/examples/dll-user