mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 15:22:39 +00:00
eslint
This commit is contained in:
parent
5722a92c4c
commit
644d19f7ec
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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')
|
||||
|
@ -20,7 +20,7 @@ class Server {
|
||||
}
|
||||
}
|
||||
|
||||
async ready() {
|
||||
async ready () {
|
||||
if (this._ready) {
|
||||
return this._ready
|
||||
}
|
||||
|
@ -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'
|
||||
|
@ -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, {
|
||||
|
Loading…
Reference in New Issue
Block a user