From 2e10261b38f1b7b673626db942a6203d4159d16f Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 28 Jun 2021 17:57:58 -0400 Subject: [PATCH] chore: warn script setup compiler macro imports --- packages/compiler-sfc/src/compileScript.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/compiler-sfc/src/compileScript.ts b/packages/compiler-sfc/src/compileScript.ts index de688acd..3e72da9c 100644 --- a/packages/compiler-sfc/src/compileScript.ts +++ b/packages/compiler-sfc/src/compileScript.ts @@ -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) {