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)) }