Skip to content

Commit 3f4ea10

Browse files
committed
Remove PostCompilePlugin
1 parent 7333e7a commit 3f4ea10

File tree

3 files changed

+5
-22
lines changed

3 files changed

+5
-22
lines changed

lib/build.js

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ import { join, resolve, sep } from 'path'
1313
import { isUrl } from './utils'
1414
import clientWebpackConfig from './webpack/client.config.js'
1515
import serverWebpackConfig from './webpack/server.config.js'
16-
import chalk from 'chalk'
17-
import PostCompilePlugin from 'post-compile-webpack-plugin'
1816
const debug = require('debug')('nuxt:build')
1917
const remove = pify(fs.remove)
2018
const readFile = pify(fs.readFile)
@@ -363,26 +361,11 @@ function getWebpackServerConfig () {
363361

364362
function createWebpackMiddleware () {
365363
const clientConfig = getWebpackClientConfig.call(this)
366-
const host = process.env.HOST || '127.0.0.1'
367-
const port = process.env.PORT || '3000'
368364
// setup on the fly compilation + hot-reload
369365
clientConfig.entry.app = _.flatten(['webpack-hot-middleware/client?reload=true', clientConfig.entry.app])
370366
clientConfig.plugins.push(
371367
new webpack.HotModuleReplacementPlugin(),
372-
new webpack.NoEmitOnErrorsPlugin(),
373-
new PostCompilePlugin(stats => {
374-
process.stdout.write('\x1Bc')
375-
if (stats.hasErrors() || stats.hasWarnings()) {
376-
console.log(stats.toString('errors-only')) // eslint-disable-line no-console
377-
console.log() // eslint-disable-line no-console
378-
console.log(chalk.bgRed.black(' ERROR '), 'Compiling failed!') // eslint-disable-line no-console
379-
} else {
380-
console.log(stats.toString(webpackStats)) // eslint-disable-line no-console
381-
console.log(chalk.bold(`\n> Open http://${host}:${port}\n`)) // eslint-disable-line no-console
382-
console.log(chalk.bgGreen.black(' DONE '), 'Compiled successfully!') // eslint-disable-line no-console
383-
}
384-
console.log() // eslint-disable-line no-console
385-
})
368+
new webpack.NoEmitOnErrorsPlugin()
386369
)
387370
const clientCompiler = webpack(clientConfig)
388371
// Add the middleware to the instance context

webpack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Until babel-loader 7 is released
3+
process.noDeprecation = true
4+
15
var nodeExternals = require('webpack-node-externals')
26
var ProgressBarPlugin = require('progress-bar-webpack-plugin')
37
var CopyWebpackPlugin = require('copy-webpack-plugin')

yarn.lock

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4347,10 +4347,6 @@ pluralize@^1.2.1:
43474347
version "1.2.1"
43484348
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45"
43494349

4350-
post-compile-webpack-plugin@^0.1.1:
4351-
version "0.1.1"
4352-
resolved "https://registry.yarnpkg.com/post-compile-webpack-plugin/-/post-compile-webpack-plugin-0.1.1.tgz#1b1a0eea890ce748556ca49e066a48c900e0b370"
4353-
43544350
postcss-calc@^5.2.0:
43554351
version "5.3.1"
43564352
resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e"

0 commit comments

Comments
 (0)