fix(compiler-sfc): should also expose regular script block bindings when <script setup> is used

close #4369
This commit is contained in:
Evan You
2021-08-17 15:52:48 -04:00
parent e22d7cdb08
commit 872b3f7ec5
3 changed files with 36 additions and 4 deletions

View File

@@ -610,10 +610,15 @@ export default {
function c() {}
class d {}
return { a, b, c, d, x }
return { aa, bb, cc, dd, a, b, c, d, xx, x }
}
}"
}
import { xx } from './x'
let aa = 1
const bb = 2
function cc() {}
class dd {}"
`;
exports[`SFC compile <script setup> with TypeScript const Enum 1`] = `