diff --git a/src/compile/Component.ts b/src/compile/Component.ts index 77c516049e..30a06ca50b 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -865,7 +865,7 @@ export default class Component { } } else { if (node.type !== 'ExportNamedDeclaration') { - if (!parent) current_group = null; + if (!parent || parent.type === 'Program') current_group = null; } } }, diff --git a/test/runtime/samples/reactive-values-exported/main.html b/test/runtime/samples/reactive-values-exported/main.svelte similarity index 55% rename from test/runtime/samples/reactive-values-exported/main.html rename to test/runtime/samples/reactive-values-exported/main.svelte index 2a9e5dc8f5..169fb7fcd8 100644 --- a/test/runtime/samples/reactive-values-exported/main.html +++ b/test/runtime/samples/reactive-values-exported/main.svelte @@ -1,11 +1,10 @@ -
{x} {y} {z}
\ No newline at end of file +{x} {y} {z}