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_EMITS ||
imported === DEFINE_EXPOSE) imported === DEFINE_EXPOSE)
) { ) {
warnOnce(
`\`${imported}\` is a compiler macro and no longer needs to be imported.`
)
removeSpecifier(i) removeSpecifier(i)
} else if (existing) { } else if (existing) {
if (existing.source === source && existing.imported === imported) { if (existing.source === source && existing.imported === imported) {