From b41fb5e88c2414c9a4927e5e30f872bc2d5cb63b Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Sun, 2 Jul 2017 02:35:07 +0430 Subject: [PATCH] update @ deprecated warning --- lib/common/utils.js | 3 ++- lib/core/nuxt.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/common/utils.js b/lib/common/utils.js index dbc513d740..14fb1665b7 100644 --- a/lib/common/utils.js +++ b/lib/common/utils.js @@ -102,7 +102,8 @@ export function r () { if (lastArg.includes('~')) { // eslint-disable-next-line no-console - console.warn('[nuxt] Aliases using `~` are deprecated, please use `@` instead.', lastArg, '->', lastArg.replace('~', '@')) + console.warn('[nuxt] Aliases using `~` are deprecated, please use `@/` instead.', + lastArg, '->', lastArg.replace('~/', '@/').replace('~', '@/')) return wp(lastArg) } diff --git a/lib/core/nuxt.js b/lib/core/nuxt.js index bc7d8c524c..3b138a5cdd 100644 --- a/lib/core/nuxt.js +++ b/lib/core/nuxt.js @@ -78,7 +78,7 @@ export default class Nuxt extends Tapable { }) } - errorHandler /* istanbul ignore next */ () { + errorHandler /* istanbul ignore next */() { // Silent if (this.options.errorHandler === false) { return @@ -107,7 +107,8 @@ export default class Nuxt extends Tapable { if (path.indexOf('@') === 0 || path.indexOf('~') === 0) { if (path.indexOf('~') === 0) { // eslint-disable-next-line no-console - console.warn('[nuxt] Aliases using `~` are deprecated, please use `@` instead.', path, '->', path.replace('~', '@')) + console.warn('[nuxt] Aliases using `~` are deprecated, please use `@/` instead.', + path, '->', path.replace('~/', '@/').replace('~', '@/')) } return join(this.options.srcDir, path.substr(1)) }