diff --git a/packages/compiler-sfc/__tests__/compileScript/__snapshots__/hoistStatic.spec.ts.snap b/packages/compiler-sfc/__tests__/compileScript/__snapshots__/hoistStatic.spec.ts.snap index 3b94955f2db..307b3e212fe 100644 --- a/packages/compiler-sfc/__tests__/compileScript/__snapshots__/hoistStatic.spec.ts.snap +++ b/packages/compiler-sfc/__tests__/compileScript/__snapshots__/hoistStatic.spec.ts.snap @@ -37,7 +37,6 @@ exports[`sfc hoist static > should hoist literal value 1`] = ` const nil = null const bigint = 100n const template = \`str\` - const regex = /.*/g export default { setup(__props) { @@ -124,6 +123,8 @@ exports[`sfc hoist static > should not hoist a variable 1`] = ` let KEY1 = 'default value' var KEY2 = 123 + const regex = /.*/g + const undef = undefined return () => {} } diff --git a/packages/compiler-sfc/__tests__/compileScript/hoistStatic.spec.ts b/packages/compiler-sfc/__tests__/compileScript/hoistStatic.spec.ts index 7b3a8a813c5..d2c76c9a2cc 100644 --- a/packages/compiler-sfc/__tests__/compileScript/hoistStatic.spec.ts +++ b/packages/compiler-sfc/__tests__/compileScript/hoistStatic.spec.ts @@ -19,7 +19,6 @@ describe('sfc hoist static', () => { const nil = null const bigint = 100n const template = \`str\` - const regex = /.*/g `.trim() const { content, bindings } = compile(`