chore: warn script setup compiler macro imports

This commit is contained in:
Evan You 2021-06-28 17:57:58 -04:00
parent d35e0b1468
commit 2e10261b38

View File

@ -778,6 +778,9 @@ export function compileScript(
imported === DEFINE_EMITS ||
imported === DEFINE_EXPOSE)
) {
warnOnce(
`\`${imported}\` is a compiler macro and no longer needs to be imported.`
)
removeSpecifier(i)
} else if (existing) {
if (existing.source === source && existing.imported === imported) {