]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: warn script setup compiler macro imports
authorEvan You <yyx990803@gmail.com>
Mon, 28 Jun 2021 21:57:58 +0000 (17:57 -0400)
committerEvan You <yyx990803@gmail.com>
Mon, 28 Jun 2021 21:57:58 +0000 (17:57 -0400)
packages/compiler-sfc/src/compileScript.ts

index de688acdb303f3ca82dbaa629cd3c2e2cf8c74e2..3e72da9cf56e82204b12dd80c88bebae3fe701f0 100644 (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) {