From 20010a6f472cf04fba67eede5a1a3881803f7484 Mon Sep 17 00:00:00 2001 From: Clark Du Date: Fri, 13 Apr 2018 14:50:39 +0800 Subject: [PATCH] misc: add warn for vendor --- lib/common/options.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/common/options.js b/lib/common/options.js index 6575c73edc..e4bfa2617e 100644 --- a/lib/common/options.js +++ b/lib/common/options.js @@ -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