From: lidlanca <8693091+lidlanca@users.noreply.github.com>
Date: Mon, 23 Aug 2021 22:40:16 +0000 (-0400)
Subject: fix(compiler-sfc): fix 'export default' rewrite with extra whitespaces (#4375)
X-Git-Tag: v3.2.5~8
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4792ebd6879115f887e393c7ed0a8475a705b6b0;p=thirdparty%2Fvuejs%2Fcore.git
fix(compiler-sfc): fix 'export default' rewrite with extra whitespaces (#4375)
---
diff --git a/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap b/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap
index 7e3a35a7cf..32ce61b727 100644
--- a/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap
+++ b/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap
@@ -33,6 +33,48 @@ return { x }
export const n = 1"
`;
+exports[`SFC compile
+
+ `)
+ assertCode(content)
+ })
+
+ test('with minimal spaces', () => {
+ const { content } = compile(`
+
+
+ `)
+ assertCode(content)
+ })
+ })
+
test('script first', () => {
const { content } = compile(`