-
Notifications
You must be signed in to change notification settings - Fork 334
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
Including the JavaScript source map in the prototype kit config #3255
Conversation
@@ -1,6 +1,7 @@ | |||
{ | |||
"assets": [ | |||
"/govuk/assets" | |||
"/govuk/assets", | |||
"/govuk/all.js.map" |
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.
Thanks @nataliecarey
Would you mind updating the *.mjs
file instead of the *.js
./src/govuk-prototype-kit/govuk-prototype-kit.config.mjs#L30
We've generated it since this PR
@36degrees Will we want to add tests for "expected source maps" like we do in this one?
./tasks/gulp/tests/after-build-package.test.mjs
For example we also have:
/govuk/common.js.map
/govuk/i18n.js.map
We can either choose to exclude these, or otherwise ensure we include them?
I'm not too familiar with the Prototype Kit but lots of other tooling has "load maps" options where source maps from other files can be included to supplement stack traces etc
Gulp source maps (example)
https://github.com/gulp-sourcemaps/gulp-sourcemaps#load-existing-source-maps
gulp.src('src/**/*.js')
.pipe(sourcemaps.init({ loadMaps: true }))
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.
Brilliant, thanks @nataliecarey
Before we approve would you mind dropping the ./package/**
changes? My fault for not explaining, we'll hold off any dist
or package
builds for a release commit:
(Here's the one from v4.5.0 5bc602a)
6965bf1
to
5d66add
Compare
Thanks Colin, re-reading your comment it was clear but I missed it. I've reverted the package changes and force pushed to keep the package history in tact. |
Thanks @nataliecarey I'm thinking those paths need to be '/govuk/assets',
'/govuk/all.js.map',
'/govuk/common.js.map',
'/govuk/i18n.js.map' Sorry for causing all this hassle |
@nataliecarey Do you want us to pick this up? We've added #3254 to our next release milestone |
5d66add
to
3f3b740
Compare
d5f0d0c
to
ed21817
Compare
@nataliecarey Colin and I picked it up to get it through the line and add a CHANGELOG entry. Hope you don't mind 😄 |
A fix for #3254