-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
#5847 added a warning when module variables are used reactively in non-module script.
This warning is triggered even if the variable is const. (And used reactively together with non-const variables, presumably!)
Reproduction
<script context="module">
export const doFoos = (a, b, c) => [a, b, c];
export const foo = 123;
</script>
<script>
export let bar;
$: foobar = doFoos(foo, bar, null);
</script>Logs
(!) Plugin svelte: "doFoos" is declared in a module script and will not be reactive
(!) Plugin svelte: "foo" is declared in a module script and will not be reactiveSystem Info
System:
OS: Linux 5.13 Arch Linux
CPU: (4) x64 Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz
Memory: 4.66 GB / 15.56 GB
Container: Yes
Shell: 5.1.8 - /bin/bash
Binaries:
Node: 16.6.0 - /usr/bin/node
Yarn: 1.22.11 - /usr/bin/yarn
npm: 7.20.3 - /usr/bin/npm
Browsers:
Firefox: 90.0.2Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels