Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VAR is declared in a module script and will not be reactive #1855

Closed
istarkov opened this issue Jul 8, 2021 · 2 comments
Closed

VAR is declared in a module script and will not be reactive #1855

istarkov opened this issue Jul 8, 2021 · 2 comments

Comments

@istarkov
Copy link
Contributor

istarkov commented Jul 8, 2021

On latest sveltekit Im starting to get following warnings on every import I have inside module scripts.

"CIRCLE_MAX_R" is declared in a module script and will not be reactive

for this

<!-- svelte-ignore module-script-reactive-declaration -->
<script lang="ts" context="module">
  import {
    CIRCLE_MAX_R,
    CIRCLE_MED_R,
    CIRCLE_MIN_R,
    CIRCLE_EDGE_R,
    SIZE,
  } from './consts';
</script>

How I can disable this warning at all as for me it seems really strange to have module level scripts and zero ability to import anything there?

PS: For svelte-check Im using svelte-check --tsconfig ./tsconfig.json --compiler-warnings 'module-script-reactive-declaration:ignore'

@Conduitry
Copy link
Member

Duplicate of sveltejs/svelte#5954

@Conduitry Conduitry marked this as a duplicate of sveltejs/svelte#5954 Jul 8, 2021
@istarkov
Copy link
Contributor Author

istarkov commented Jul 8, 2021

IMO it doesnt look as duplicate of that issue even I use <!-- svelte-ignore module-script-reactive-declaration --> probably there is a way to somehow pass in sveltekit compiler-warnings now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants