-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 5: TypeScript types for snippets are not removed #10766
Comments
Repository seems to be private. |
@brunnerh Wops! Sorry, fixed now. |
Thanks for the bug report! I'm running into the same issue |
This is tricky. The strip happens in
I prefer the second or third option, because the first option would mean consumers of the library would be required to install TypeScript and set up the preprocessor for it. |
We decided to make this a special-case in |
* fix: don't strip `lang="ts"` tag in Svelte 5 closes sveltejs/svelte#10766 * rename parameters --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>
Describe the bug
TypeScript types like these:
https://github.com/andersekdahl/svelte5-snippet-repro/blob/main/src/lib/MyComponent.svelte#L4
Are not removed when building, as seen here:
https://github.com/andersekdahl/svelte5-snippet-repro/blob/main/dist/MyComponent.svelte#L3
Reproduction
Created a new library project using sveltekit with the latest svelte 5 release here:
https://github.com/andersekdahl/svelte5-snippet-repro
Running
npm run package
will build the code and the issue is visible in the dist folder which I also commited to make it easier to spot the problem.Logs
No response
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: