We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
<script setup>
1 parent 468e0d9 commit a603d56Copy full SHA for a603d56
packages/compiler-sfc/src/compileScript.ts
@@ -816,13 +816,14 @@ export function compileScript(
816
s.appendRight(endOffset, `\nreturn ${returned}\n}\n\n`)
817
818
// 11. finalize default export
819
- let runtimeOptions = ``
+ // expose: [] makes <script setup> components "closed" by default.
820
+ let runtimeOptions = `\n expose: [],`
821
if (optionsArg) {
- runtimeOptions = `\n ${scriptSetup.content
822
+ runtimeOptions += `\n ${scriptSetup.content
823
.slice(optionsArg.start! + 1, optionsArg.end! - 1)
824
.trim()},`
825
} else if (optionsType) {
- runtimeOptions =
826
+ runtimeOptions +=
827
genRuntimeProps(typeDeclaredProps) + genRuntimeEmits(typeDeclaredEmits)
828
}
829
if (isTS) {
0 commit comments