-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
sourcemaps works incorrectly after any change in dev mode #997
Comments
Is this after a hot reload or a complete browser refresh? As in the first case it would make sense |
browser refresh |
I've compared source maps before and after change, parcel adds some construct that breaks aligning {"version":3,"sources":["foo.js","index.js"],"names":["foo","console","log"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;;AAEAC,QAAQC,GAAR,CAAY,OAAZ;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QDHgBF,MAAAA;AAAT,SAASA,GAAT,GAAe;AACpBC,UAAQC,GAAR,CAAY,KAAZ;AACD","file":"parcel-sourcemap.map","sourcesContent":["export function foo() {\n console.log(\"foo\");\n}\n","import { foo } from \"./foo\";\n\nconsole.log(\"index\");\nfoo();\n"]}
{"version":3,"sources":["foo.js","index.js"],"names":["foo","console","log"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAAgBA,MAAAA;AAAT,SAASA,GAAT,GAAe;AACpBC,UAAQC,GAAR,CAAY,KAAZ;AACD;;;;ACFD;;AAEAD,QAAQC,GAAR,CAAY,OAAZ;AACA","file":"parcel-sourcemap.map","sourcesContent":["export function foo() {\n console.log(\"foo\");\n}\n","import { foo } from \"./foo\";\n\nconsole.log(\"index\");\nfoo();\n\n"]}
|
any ETA? |
Confirming bug, after a few saves, you have to restart the server for sourcemaps to work correctly |
Same for me, very annoying. |
Same here. After first change source maps becomes useless. |
Same for me. any update? |
I've looked into it and it is a pretty straightforward bug, I've fixed it and opened up a PR |
index.html
Run
parcel index.html
After first build source maps works correctly
console output:
But after some changes in any of file sourcemaps turns into a mess:
Environment
The text was updated successfully, but these errors were encountered: