diff --git a/lib/builder.js b/lib/builder.js index 2f1eb98b35..2f9251b8c7 100644 --- a/lib/builder.js +++ b/lib/builder.js @@ -8,8 +8,7 @@ import serialize from 'serialize-javascript' import { join, resolve, basename, dirname } from 'path' import Tapable from 'tappable' import MFS from 'memory-fs' -import { sequence, parallel } from "./utils" -import { r, wp, createRoutes } from './utils' +import { r, wp, createRoutes, parallel } from './utils' import clientWebpackConfig from './webpack/client.config.js' import serverWebpackConfig from './webpack/server.config.js' @@ -294,7 +293,7 @@ export default class Builder extends Tapable { } if (!this.options.dev) { // Show build stats for production - console.log(stats.toString(this.webpackStats)) // eslint-disable-line no-console + console.log(stats.toString(this.webpackStats)) // eslint-disable-line no-console if (stats.hasErrors()) { return reject(new Error('Webpack build exited with errors')) } @@ -326,7 +325,7 @@ export default class Builder extends Tapable { // Run after each compile this.compiler.plugin('done', stats => { - console.log(stats.toString(this.webpackStats)) // eslint-disable-line no-console + console.log(stats.toString(this.webpackStats)) // eslint-disable-line no-console // Reload renderer if available if (this.nuxt.renderer) { this.nuxt.renderer.loadResources(mfs) diff --git a/lib/nuxt.js b/lib/nuxt.js index 499d254343..99ed0a87ca 100644 --- a/lib/nuxt.js +++ b/lib/nuxt.js @@ -49,8 +49,8 @@ export default class Nuxt extends Tapable { // Wait for all components to be ready await this.applyPluginsAsync('beforeInit') // 1- Modules - await this.applyPluginsAsync('init') // 2- Builder - await this.applyPluginsAsync('afterInit') // 3- Renderer + await this.applyPluginsAsync('init') // 2- Builder + await this.applyPluginsAsync('afterInit') // 3- Renderer this.initialized = true return this diff --git a/lib/renderer.js b/lib/renderer.js index d9c311fbcb..cc5b93ca80 100644 --- a/lib/renderer.js +++ b/lib/renderer.js @@ -10,7 +10,6 @@ import _ from 'lodash' import { resolve, join } from 'path' import fs from 'fs-extra' import { createBundleRenderer } from 'vue-server-renderer' -import chalk from 'chalk' import { getContext, setAnsiColors, encodeHtml } from './utils' const debug = require('debug')('nuxt:render') diff --git a/lib/server.js b/lib/server.js index f0082e8e7c..661a3e7a1a 100644 --- a/lib/server.js +++ b/lib/server.js @@ -20,7 +20,7 @@ class Server { } } - async ready() { + async ready () { if (this._ready) { return this._ready } diff --git a/lib/webpack/base.config.js b/lib/webpack/base.config.js index fd15de3ac2..25b56c8206 100644 --- a/lib/webpack/base.config.js +++ b/lib/webpack/base.config.js @@ -1,8 +1,7 @@ import ExtractTextPlugin from 'extract-text-webpack-plugin' -import { defaults } from 'lodash' -import { join, resolve, } from 'path' +import { defaults, cloneDeep } from 'lodash' +import { join, resolve } from 'path' import webpack from 'webpack' -import { cloneDeep } from 'lodash' import { isUrl, urlJoin } from '../utils' import vueLoaderConfig from './vue-loader.config' import { styleLoader, extractStyles } from './helpers' diff --git a/lib/webpack/client.config.js b/lib/webpack/client.config.js index 3b2e320b9a..da7e553555 100644 --- a/lib/webpack/client.config.js +++ b/lib/webpack/client.config.js @@ -1,11 +1,10 @@ -import { each, defaults, flatten } from 'lodash' +import { each } from 'lodash' import webpack from 'webpack' import VueSSRClientPlugin from 'vue-server-renderer/client-plugin' import HTMLPlugin from 'html-webpack-plugin' import FriendlyErrorsWebpackPlugin from 'friendly-errors-webpack-plugin' import ProgressBarPlugin from 'progress-bar-webpack-plugin' import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer' -import OfflinePlugin from 'offline-plugin' import { resolve } from 'path' import base from './base.config.js' @@ -86,7 +85,6 @@ export default function webpackClientConfig () { }) ) - // Define Env config.plugins.push( new webpack.DefinePlugin(Object.assign(env, {