mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
webpack-stylish
This commit is contained in:
parent
76b5e0454a
commit
f650763357
@ -535,9 +535,6 @@ module.exports = class Builder {
|
||||
return reject(err)
|
||||
}
|
||||
|
||||
// Show build stats for production
|
||||
console.log(stats.toString(this.webpackStats)) // eslint-disable-line no-console
|
||||
|
||||
/* istanbul ignore if */
|
||||
if (stats.hasErrors()) {
|
||||
return reject(new Error('Webpack build exited with errors'))
|
||||
|
@ -1,9 +1,9 @@
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||
const TimeFixPlugin = require('time-fix-plugin')
|
||||
const WarnFixPlugin = require('./plugins/warnfix')
|
||||
const webpack = require('webpack')
|
||||
const ProgressPlugin = require('./plugins/progress')
|
||||
|
||||
const webpack = require('webpack')
|
||||
const { cloneDeep } = require('lodash')
|
||||
const { join, resolve } = require('path')
|
||||
|
||||
|
@ -3,6 +3,7 @@ const webpack = require('webpack')
|
||||
const VueSSRClientPlugin = require('vue-server-renderer/client-plugin')
|
||||
const HTMLPlugin = require('html-webpack-plugin')
|
||||
const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin')
|
||||
const StylishPlugin = require('webpack-stylish')
|
||||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
|
||||
const { resolve } = require('path')
|
||||
const Debug = require('debug')
|
||||
@ -117,6 +118,11 @@ module.exports = function webpackClientConfig() {
|
||||
)
|
||||
}
|
||||
|
||||
// https://github.com/webpack-contrib/webpack-stylish
|
||||
if (!this.options.dev) {
|
||||
config.plugins.push(new StylishPlugin())
|
||||
}
|
||||
|
||||
// Webpack Bundle Analyzer
|
||||
if (this.options.build.analyze) {
|
||||
config.plugins.push(
|
||||
|
Loading…
Reference in New Issue
Block a user