-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Improve source map handling #699
Comments
Huge plus one on this. Currently debugging things in builds is a pretty sizable PITA. On my app, chrome code formatted just gives up, and Sentry error reports also are pretty damn useless. |
In my app what i'm seeing is that .js file has a sourcemap file that goes like this:
The issue is that sources array only has scss files, and no javascript files at all. |
And there's these messages as well:
|
If defaultLoaders plugin is commented out from wmr, all sourcemaps start working |
Had a go at this over the weekend and there are various places which are not aware of sourcemaps yet. Those generate wrong line and column mappings or miss source information completely. The One reason for column mismatches seems to be that something in our stack interprets column mappings wrong when a new line begins. The spec clearly says that all column positions of the original file are relative to the previous one, but something resets it to Also found various ways to speed up source map generation and parsing in itself by eliminating all cases of allocations. The underlying library of Looking forward to dive deeper into this! |
Sounds super exciting! |
The source map handling in WMR can be a lot better. Namely:
--sourcemap
generates sourcemaps Add groundwork for source map support #715container.transform()
acorn-traverse
generates correct mappingssourcesContent
, so that the original code is shown in browser devtoolsEnsure npm plugin supports source maps (might need a rewrite)- out of scope for now. The rewrite will happen either way and we can do the source maps in one go.sass
(iirc they have different file mappings)./foo.js
vsfoo.js
The text was updated successfully, but these errors were encountered: