You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I almost don't want to ask, because it seems Svelte's compilation weirdness has been tricky to work with but here goes...
Is it possible to use the svelte plugin https://esbuild.github.io/plugins/#svelte-pluginand have typescript enabled and used in Svelte? Including using it with watch and having it output proper error line/columns in the original svelte source code?
Thanks again the effort put into esbuild! I appreciate the scope of the project. I have managed to get something cobbled together using esbuild w/ watch, svelte-preprocess-esbuild and esbuild-svelte but line numbers on errors are not accurate.
Thanks in advance!
The text was updated successfully, but these errors were encountered:
I’m not sure, sorry. I don’t know anything about Svelte. The Svelte plugin in the documentation is just a quick example of doing a single source code transformation with source maps. It’s not meant to be a production quality plugin.
At a high level, you would have to transform the code with source map aware tools at each step. For example if the Svelte compiler has a hook to transform TypeScript strings contained within it, the Svelte compiler would need to pass a source map to the TypeScript transformer, the TypeScript transformer would need to transform the source map along with the source, and then the Svelte compiler would need to accept the source map from the TypeScript transformer and transform it again along with the Svelte compilation.
You could check the existing plugin list to see if someone has already figured this out and/or work with them to add this feature: https://github.com/esbuild/community-plugins. Otherwise you could try to build it yourself.
I almost don't want to ask, because it seems Svelte's compilation weirdness has been tricky to work with but here goes...
Is it possible to use the svelte plugin https://esbuild.github.io/plugins/#svelte-plugin and have typescript enabled and used in Svelte? Including using it with
watch
and having it output proper error line/columns in the original svelte source code?Thanks again the effort put into
esbuild
! I appreciate the scope of the project. I have managed to get something cobbled together using esbuild w/ watch,svelte-preprocess-esbuild
andesbuild-svelte
but line numbers on errors are not accurate.Thanks in advance!
The text was updated successfully, but these errors were encountered: