mirror of https://github.com/sveltejs/svelte
fix: only treat instance context exports as accessors (#9500)
* failing test for #9499 * limit export handling to instance context * changeset --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>pull/9507/head
parent
ede1edd314
commit
c827b0c772
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: only treat instance context exports as accessors
|
@ -0,0 +1,9 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
html: `<p>42</p>`,
|
||||||
|
|
||||||
|
async test({ assert, target, window, component }) {
|
||||||
|
assert.equal(component.answer, undefined);
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,7 @@
|
|||||||
|
<svelte:options runes />
|
||||||
|
|
||||||
|
<script context="module">
|
||||||
|
export const answer = 42;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<p>{answer}</p>
|
Loading…
Reference in new issue