Replies: 9 comments 8 replies
-
Our TS->JS builder supports source maps, but dev mode will make changes to the file after it's been built to JS that can break some source maps. That's what we're working to improve now. fwiw, TS->JS is a very light compilation, the generated JS code will look almost identical. Since we build each file individually during development, source maps really don't buy you as much vs. the added complexity. If you haven't tried developing with Snowpack without source maps, I'd suggest giving it a try. |
Beta Was this translation helpful? Give feedback.
-
Hi, I am totally confused. I am trying to debug my TypeScript in VS Code, I am using the latest snowpack and the latest typescript-blank-template. I add a breakpoint on the TypeScript code and it says 'unbound breakpoint', I look in the public directory and there is no breakpoint file generated. If I can't add breakpoints to my TS then I can't use the debugger, if there is no sourcemap file how can the debugger link the compiled JS and the source TS? esBuild should create sourcemaps, I am not using any plugins other than the supplied one that outputs the TSC info. How am I meant to debug my TypeScript code? Surely this functionality is absolutely essential, or is everyone using a workaround that I am not seeing? Thanks! |
Beta Was this translation helpful? Give feedback.
-
I can also attest that the default Snowpack React-Typescript template generates no sourcemaps in the dist folder. And neither browser finds any. |
Beta Was this translation helpful? Give feedback.
-
I can also confirm that the default To be honest, not having source maps is a show stopper that prevent TypeScript programmers to adopt Snowpack. |
Beta Was this translation helpful? Give feedback.
-
Avid TypeScript developer here, new to Snowpack. Im struggling between the tradeoff of (truly faster) build speeds vs having a great debug environment. I think the whole 'dealbreaker' attitude is incorrect, I've had zero issues debugging in JS (Where I need to, seriously, TS is meant to prevent debugging issues) - though it's a huge inconvenience to have to switch from a TS mindset to seeing the translated JS code Really looking forward to seeing some maps shipped, especially if it can all be done in the blazing fast speed I've come to love. Good luck team! |
Beta Was this translation helpful? Give feedback.
-
Based on my experience debugging TypeScript in VS Code is really a superior dev experience. Would love to see this working. |
Beta Was this translation helpful? Give feedback.
-
Hi Team Is this fixed? I am still unable to use TS sourcemaps for app created via template |
Beta Was this translation helpful? Give feedback.
-
Any updates? |
Beta Was this translation helpful? Give feedback.
-
Works in In your snowpack.config.mjs: buildOptions: {
sourcemap: true
} In your tsconfig.json: "compilerOptions": {
"sourceMap": true
} Note: The documentation doesn't mention the tsconfig setting which confused me at first. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I've been reading around, looking for solutions for the missing sourcemaps when using typescript template and all I've found is that doing multiple steps with sourcemaps is problematic at the moment.
But TypeScript supports sourcemaps and there's no need for multiple steps... Is it possible working with TypeScript and sourcemaps somehow? is it planned?
I want to move to full Snowpack dev env. and TypeScript sourcemaps are a must for me.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions