webpack-stylish

This commit is contained in:
Pooya Parsa 2018-03-13 15:36:12 +03:30
parent 76b5e0454a
commit f650763357
3 changed files with 7 additions and 4 deletions

View File

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

View File

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

View File

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