mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
chore: minor webpack fixes
This commit is contained in:
parent
765f560b8c
commit
4c5c7b3bb4
@ -18,8 +18,8 @@ import upath from 'upath'
|
||||
import { r, wp, wChunk, createRoutes, parallel, relativeTo, waitFor, createSpinner } from '../common/utils'
|
||||
import Options from '../common/options'
|
||||
|
||||
import ClientWebpackConfig from './webpack/client.config'
|
||||
import ServerWebpackConfig from './webpack/server.config'
|
||||
import ClientWebpackConfig from './webpack/client'
|
||||
import ServerWebpackConfig from './webpack/server'
|
||||
|
||||
const debug = Debug('nuxt:build')
|
||||
debug.color = 2 // Force green color
|
||||
|
@ -168,8 +168,8 @@ export default class WebpackBaseConfig {
|
||||
// Hide warnings about plugins without a default export (#1179)
|
||||
plugins.push(new WarnFixPlugin())
|
||||
|
||||
// Build progress indicator
|
||||
if (!this.options.test) {
|
||||
// Build progress indicator
|
||||
if (this.options.build.profile) {
|
||||
plugins.push(new webpack.ProgressPlugin({ profile: true }))
|
||||
} else {
|
||||
@ -181,11 +181,15 @@ export default class WebpackBaseConfig {
|
||||
}))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add stats plugin
|
||||
// Add stats plugin
|
||||
if (!this.options.dev) {
|
||||
plugins.push(new StatsPlugin(this.options.build.stats))
|
||||
}
|
||||
|
||||
// Add friendly error plugin
|
||||
// Add friendly error plugin
|
||||
if (!this.options.dev && !this.options.test) {
|
||||
plugins.push(
|
||||
new FriendlyErrorsWebpackPlugin({
|
||||
clearConsole: true,
|
||||
@ -193,6 +197,7 @@ export default class WebpackBaseConfig {
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
return plugins
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ import BundleAnalyzer from 'webpack-bundle-analyzer'
|
||||
import MiniCssExtractPlugin from 'mini-css-extract-plugin'
|
||||
|
||||
import VueSSRClientPlugin from './plugins/vue/client'
|
||||
import BaseConfig from './base.config'
|
||||
import BaseConfig from './base'
|
||||
|
||||
export default class WebpackClientConfig extends BaseConfig {
|
||||
constructor(builder) {
|
||||
|
@ -4,7 +4,7 @@ import fs from 'fs'
|
||||
import webpack from 'webpack'
|
||||
import nodeExternals from 'webpack-node-externals'
|
||||
|
||||
import BaseConfig from './base.config'
|
||||
import BaseConfig from './base'
|
||||
import VueSSRServerPlugin from './plugins/vue/server'
|
||||
|
||||
export default class WebpackServerConfig extends BaseConfig {
|
||||
|
@ -4,7 +4,7 @@ import path from 'path'
|
||||
import ـ from 'lodash'
|
||||
import createResolver from 'postcss-import-resolver'
|
||||
|
||||
import { isPureObject } from '../../common/utils'
|
||||
import { isPureObject } from '../../../common/utils'
|
||||
|
||||
export default function postcssConfig() {
|
||||
let config = ـ.cloneDeep(this.options.build.postcss)
|
||||
|
Loading…
Reference in New Issue
Block a user