From 691d354af9e3a66c781494656b367950fcd8faec Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 25 Jun 2021 14:05:59 -0400 Subject: [PATCH] fix(compiler-sfc): fix defineProps() call on imported identifier --- .../__snapshots__/compileScript.spec.ts.snap | 17 +++++++++++++++++ .../__tests__/compileScript.spec.ts | 13 +++++++++++++ packages/compiler-sfc/src/compileScript.ts | 10 +++++++++- 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap b/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap index d65806a4..5e80e979 100644 --- a/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap +++ b/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap @@ -73,6 +73,23 @@ return { } }" `; +exports[`SFC compile + `) + assertCode(content) + expect(content).toMatch(`export default { + props: propsModel,`) + }) + test('defineEmit() (deprecated)', () => { const { content, bindings } = compile(`