Failing to import constant #502
Replies: 2 comments
-
There is an open issue about this problem here. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Closing this discussion as importing constants from other files is intentionally not supported. As described in #238, we will have an API for sharing media queries soon. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am seeing an error when importing media queries into my components. Here's a bit of context with a minimum repro example.
I have a couple of constants defining media queries in a file to avoid duplication such as:
Then I import it into my svelte component like this:
And get an error saying:
Interestingly if I inline the const it does work:
Of course I would like to have my medias in a central place so the later option is not an acceptable solution but it's a sample to show this happens due to how things get imported into scope.
Beta Was this translation helpful? Give feedback.
All reactions