-
Notifications
You must be signed in to change notification settings - Fork 331
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
Add source maps to compiled JavaScript and CSS #3023
Conversation
6dd75ec
to
b64ca06
Compare
b64ca06
to
fefbd54
Compare
Sourcemaps are great and the PR looks technically neat for adding them in. Just looking into what will consume them so we're clear on who will benefit and who will not (depending on how code is loaded) and maybe check if some guidance will need updating. More news on this space in a bit 😄 |
Who benefits from sourcemaps?TL;DR:
People loading the files from
|
fefbd54
to
9bbf6b2
Compare
9bbf6b2
to
77f8903
Compare
baf48e0
to
f4046ab
Compare
77f8903
to
9b1e7d7
Compare
9b1e7d7
to
efe78ef
Compare
a93c678
to
72e56d9
Compare
72e56d9
to
f7f66e2
Compare
efe78ef
to
e8c7c83
Compare
@romaricpascal Rebased and ready for review again 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking neat! 🙌🏻
f7f66e2
to
5944234
Compare
e8c7c83
to
6f72647
Compare
5944234
to
374a8d7
Compare
Otherwise source maps don’t match the files they belong to
6f72647
to
35a4fb0
Compare
This PR adds source maps to our compiled code
For example:
govuk-frontend-4.4.0.min.js
//# sourceMappingURL=govuk-frontend-4.4.0.min.js.map
govuk-frontend-4.4.0.min.css
/*# sourceMappingURL=govuk-frontend-4.4.0.min.css.map */
When browser developer tools are open the associated source map files are downloaded
JavaScript source maps
See log messages and stack traces mapped to the
*.mjs
source code (with line numbers)Click through to the original source via the browser
CSS source maps
See styles mapped to the Sass
*.scss
source code (with line numbers)