-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
Does not respect default language in svelte.config.js #593
Comments
Did you restart the language server after altering the config? Because loading config is expensive in terms of performance so we make it only load once. |
yeah, even restarted vs code. |
Read the disclaimer part: https://github.com/sveltejs/svelte-preprocess/blob/master/docs/getting-started.md#31-setting-default-languages Is this feature planned to be added to the language server? |
This is supported. Don't know what's causing the problem on your end, Can you provide a minimal reproducible? |
Oh yeah. That's the problem. Doesn't notice the mix of common js and es module |
Yeah, I forgot |
The part I was missing was that the svelte language-tools doesn't read the defaults from the rollup.config.js. I had to add a svelte.config.js file to the root of my project that includes the same config options for sveltePreprocess as in the rollup config. This is documented in the documentation for svelte-preprocess: Would reading the defaults from the rollup.config.js file be out of the question for the svelte language-tools? Because the onboarding experience for me on this one was a bit painful. |
Sorry, the config passed into rollup-plugin-svelte is not visible from the outside of the function. |
Importing Node recognizes What would the blocker be? Is this a LSP issue? Or is it a |
See #509 for more info on this. Also you are allowed to import CommonJS modules from ES modules, you just need to change your file ending to become |
Describe the bug
My
svelte.config.js
file looks like this:Expected behavior
It is showing me that you have to add
lang='ts'
to svelte file that looks something like this:Screenshots
System (please complete the following information):
The text was updated successfully, but these errors were encountered: