update @ deprecated warning

This commit is contained in:
Pooya Parsa 2017-07-02 02:35:07 +04:30
parent 57e75c58d2
commit b41fb5e88c
2 changed files with 5 additions and 3 deletions

View File

@ -102,7 +102,8 @@ export function r () {
if (lastArg.includes('~')) { if (lastArg.includes('~')) {
// eslint-disable-next-line no-console // 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) return wp(lastArg)
} }

View File

@ -78,7 +78,7 @@ export default class Nuxt extends Tapable {
}) })
} }
errorHandler /* istanbul ignore next */ () { errorHandler /* istanbul ignore next */() {
// Silent // Silent
if (this.options.errorHandler === false) { if (this.options.errorHandler === false) {
return return
@ -107,7 +107,8 @@ export default class Nuxt extends Tapable {
if (path.indexOf('@') === 0 || path.indexOf('~') === 0) { if (path.indexOf('@') === 0 || path.indexOf('~') === 0) {
if (path.indexOf('~') === 0) { if (path.indexOf('~') === 0) {
// eslint-disable-next-line no-console // 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)) return join(this.options.srcDir, path.substr(1))
} }