-
Notifications
You must be signed in to change notification settings - Fork 917
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
Make internal transforms source-map compliant #1213
Comments
Hey @FredKSchott ! I'm interested in picking this up, I've got some experience using magic-string with creating rollup plugins so I should have some idea of the work involved here. |
@FredKSchott I have been messing around with the Chrome devtools and getting nowhere, can I enable sourcemaps somehow right now even with errors? I would dearly love to stay in VS Code for debugging. I am not using any snowpack plugins, only the default TypeScript blank template. Thanks! |
Hey @alex-saunders thanks for picking it up! Let us know if there is anything we can help you with. Please feel free to start a work-in-progress pull request as early as you like |
Also happy to help with this, @alex-saunders lmk if you need eyes/ears/brains for review or I can also take a stab at it if you don't have the time right now (though it sounds like you're more experienced with the subject matter). |
I don't have a lot of experience with building any sort of tooling but this seems like such an important feature to include. So, as a beginner what sort of things would help me get started implementing this? I know a couple people have offered help but it seems the issue isn't making much progress. I want to help. I just don't know what I'm doing. |
Discussion/Proposal created to intentionally remove sourcemap support from dev in v3.0 (while keeping it for bundled/optimized/minfied build output) |
just pointing out that the #1876 discussion resulted to actually implement source maps in dev mode. |
After investigate, and to my surprise Maybe look a Vite source code to try understand how to correctly implement a |
Some work has been done on this recent in #3271 it is an initial attempt but would love to hear if the changes there helped anyone (or hindered 😅)! You should see "out of the box" source maps for any JSX/TSX, svelte files and vue templates in development mode. |
Hey @lukejacksonn, thank you for this work. However it only works for a single file. This is the template I'm currently using:
And the config |
I noticed the same thing as @sant123 in a TypeScript and React project. Another issue I noticed with the new experimental support is that the This is great progress though! I feel like it’s almost there! 😄 |
@sant123 Setting |
You are right @ghry5! Going to follow this workaround for now. Thank you! |
Hi team, is there any progress about this? I'm really looking forward to it. 😀 |
PLease, help devs , we need the sourcemap ... My team is pushing for Vite and I cant defend snowpack without that feature |
too late , we all migrate to ViteJs 😉 |
we migrated to vite as well |
Now that #1048 has merged, we can add full sourcemap support. All that's needed is to convert our current dev/build string modifications to use https://www.npmjs.com/package/magic-string.
wrapImportMeta
(all other proxy files are okay / out of scope for now, since those were not JS to begin with)createImportResolver
(will need to use the magic strings.overwrite
API).Also, now that we support source maps with transforms we can log a warning when
sourceMap: true
but a transform function isn't returning source maps, causing no maps to be created.The text was updated successfully, but these errors were encountered: