mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-12 03:38:07 +00:00
Merge branch 'dev' into feat/esm
This commit is contained in:
commit
9a403a156d
@ -144,6 +144,15 @@ export default function webpackBaseConfig({ name, isServer }) {
|
|||||||
// Hide warnings about plugins without a default export (#1179)
|
// Hide warnings about plugins without a default export (#1179)
|
||||||
config.plugins.push(new WarnFixPlugin())
|
config.plugins.push(new WarnFixPlugin())
|
||||||
|
|
||||||
|
const shouldClearConsole =
|
||||||
|
this.options.build.stats !== false &&
|
||||||
|
this.options.build.stats !== 'errors-only'
|
||||||
|
|
||||||
|
// Add friendly error plugin
|
||||||
|
config.plugins.push(
|
||||||
|
new FriendlyErrorsWebpackPlugin({ clearConsole: shouldClearConsole })
|
||||||
|
)
|
||||||
|
|
||||||
// Clone deep avoid leaking config between Client and Server
|
// Clone deep avoid leaking config between Client and Server
|
||||||
return _.cloneDeep(config)
|
return _.cloneDeep(config)
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@ import path from 'path'
|
|||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
import webpack from 'webpack'
|
import webpack from 'webpack'
|
||||||
import HTMLPlugin from 'html-webpack-plugin'
|
import HTMLPlugin from 'html-webpack-plugin'
|
||||||
import FriendlyErrorsWebpackPlugin from '@nuxtjs/friendly-errors-webpack-plugin'
|
|
||||||
import ExtractTextPlugin from 'extract-text-webpack-plugin'
|
import ExtractTextPlugin from 'extract-text-webpack-plugin'
|
||||||
import StylishPlugin from 'webpack-stylish'
|
import StylishPlugin from 'webpack-stylish'
|
||||||
import BundleAnalyzer from 'webpack-bundle-analyzer'
|
import BundleAnalyzer from 'webpack-bundle-analyzer'
|
||||||
@ -79,15 +78,6 @@ export default function webpackClientConfig() {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
const shouldClearConsole =
|
|
||||||
this.options.build.stats !== false &&
|
|
||||||
this.options.build.stats !== 'errors-only'
|
|
||||||
|
|
||||||
// Add friendly error plugin
|
|
||||||
config.plugins.push(
|
|
||||||
new FriendlyErrorsWebpackPlugin({ clearConsole: shouldClearConsole })
|
|
||||||
)
|
|
||||||
|
|
||||||
// Optimization
|
// Optimization
|
||||||
config.optimization.splitChunks = {
|
config.optimization.splitChunks = {
|
||||||
chunks: 'all',
|
chunks: 'all',
|
||||||
|
Loading…
Reference in New Issue
Block a user