Closed jankalfus closed 3 years ago
Yes indeed that would be nice, thanks for raising!
@tomblachut I just wanted to chime in here and say you can probably close this issue. Svelte is deprecating the defaults
option in svelte-preprocess
and recommending you explicitly specify the language in the <script>
tag (i.e. <script lang="ts">
. Here's the message I'm seeing in my terminal:
[svelte-preprocess] Deprecation notice: using the "defaults" option is no longer recommended and will be removed in the next major version. Instead, define the language being used explicitly via the lang attribute.
By the way, thank you so much for all the great work on this plugin! I don't know what I'd do without it.
@mikerourke thanks for the info and for kind words :)
I'll rename this issue to better reflect that it's specifically about "defaults" and close it.
The official Svelte plugin for VS Code is able to load preprocess options passed to
sveltePreprocess
insvelte.config.js
, and set up defaults correctly. It would be awesome to have support for that in this plugin as well.For example, if one sets up typescript in
svelte.config.js
as the default language:...then typescript can be used in the
script
tag without having to specifylang
:This works nicely in VS Code with the official Svelte plugin:
But fails in WebStorm with this plugin (0.18.0.203):
Related issue from the VS Code plugin repository: https://github.com/sveltejs/language-tools/issues/593