[fix] warning on reactive use of module const (#6606) (#6607)

pull/6614/head
Oliver Ford 3 years ago committed by GitHub
parent b6c238eeac
commit f48239914d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1312,7 +1312,7 @@ export default class Component {
if (variable) {
variable.is_reactive_dependency = true;
if (variable.module) {
if (variable.module && variable.writable) {
should_add_as_dependency = false;
module_dependencies.add(name);
}

@ -0,0 +1,9 @@
<script context="module">
export const foo = 123;
export const doFoo = (foo) => foo;
</script>
<script>
$: bar = foo;
$: doFoo(bar);
</script>
Loading…
Cancel
Save