mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 15:22:39 +00:00
update @ deprecated warning
This commit is contained in:
parent
57e75c58d2
commit
b41fb5e88c
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user