misc: add warn for vendor

This commit is contained in:
Clark Du 2018-04-13 14:50:39 +08:00
parent 5cd4fe8422
commit 20010a6f47
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9

View File

@ -2,16 +2,13 @@ import path from 'path'
import fs from 'fs'
import _ from 'lodash'
import Debug from 'debug'
import consola from 'consola'
import { isUrl, isPureObject } from '../common/utils'
import modes from './modes'
import defaults from './nuxt.config'
const debug = Debug('nuxt:build')
debug.color = 2 // Force green color
const Options = {}
export default Options
@ -182,9 +179,10 @@ Options.from = function (_options) {
options.build.stats = false
}
// Vendor backward compability with nuxt 1.x
if (!options.build.vendor) {
options.build.vendor = []
// Vendor backward compatibility with nuxt 1.x
if (typeof options.build.vendor !== 'undefined') {
delete options.build.vendor
consola.warn('vendor has been deprecated due to webpack4 optimization')
}
// TODO: remove when mini-css-extract-plugin supports HMR