-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
svelte-kit package
errors due to not removing lang="ts"
#2450
Comments
Even though this is actually a real issue, I don't think the fix should be in SvelteKit nor |
I tend to add a quick fix for this into SvelteKit until we have a way forward. I'm not sure if Svelte core should be responsible of this, or if it should be the preprocessors. If the preprocessor rework RFC is implemented in some form, it means that every preprocessor has the whole source content at its hand and then should be responsible (IMO) for removing the lang tag. |
A quick fix would be nice in the meantime since the svelte fix (sveltejs/svelte#6611) doesn't seem it would be merged soon. Though maybe we can extract the I do think Svelte core should be responsible for it though since any script/style preprocessor outside of
Interesting, we could use that for |
Absolutely, main reason for opening this issue is just so something is done about it before 1.0 |
Fixes #2450 by doing a regex-based string replacement. This should be handled elsewhere in the long run.
Fixes #2450 by doing a regex-based string replacement. This should be handled elsewhere in the long run.
Describe the bug
When running
svelte-kit package
, code is preprocessed but thelang="ts"
attributes are not removed. This is giving me errors when trying to use the generated components. I wanted to open this issue in this repo to make sure it's either resolved before SvelteKit 1.0, or it's mentioned in the docs that preprocessing is broken.Same issue in svelte-preprocess: sveltejs/svelte-preprocess#260
Related SvelteKit issue: #1843
Reproduction
npm init svelte@next my-app
with TypeScript enabledcd my-app
npm install sass svelte2tsx && npm install
src/lib/Example.svelte
:svelte-kit package
Logs
Error from using a component generated by
svelte-kit package
:System Info
Severity
serious, but I can work around it
The text was updated successfully, but these errors were encountered: