mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 23:32:38 +00:00
chore: clarify duplicate import message
This commit is contained in:
parent
05403910ac
commit
6aa5d12652
@ -132,7 +132,7 @@ export default defineNuxtModule<Partial<ImportsOptions>>({
|
|||||||
const preset = presetMap.get(i.as)
|
const preset = presetMap.get(i.as)
|
||||||
|
|
||||||
if (preset) {
|
if (preset) {
|
||||||
console.warn(`[imports] "${i.as}" is already defined and auto imported from "${preset}" within nuxt itself. Please don't name your composable the same as a preset, as it will lead to unexpected behavior.`)
|
console.warn(`[imports] "${i.as}" is already defined and auto imported from "${preset}" within nuxt itself. Please consider renaming "${i.as}" at ${i.from}.`)
|
||||||
}
|
}
|
||||||
|
|
||||||
i.priority = i.priority || priorities.find(([dir]) => i.from.startsWith(dir))?.[1]
|
i.priority = i.priority || priorities.find(([dir]) => i.from.startsWith(dir))?.[1]
|
||||||
|
Loading…
Reference in New Issue
Block a user