-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BUGFIX lts] build: Turn off sourcemaps for TS-to-ES compilation #17128
Conversation
I mentioned this in discord chat, but would you mind bringing the test from 5e1f2f3 over? I really would like to do something to ensure we don't regress this in the future... |
We seem to use Babel to compile ES to AMD modules and that now includes ES modules there were originally written in TypeScript. The TypeScript compiler is apparently outputting sourcemaps by default, but it looks like Babel can't handle those properly. Instead Babel keeps the sourcemap comments inside of the AMD modules, which causes the final concatenated file to have *multiple* sourcemap comments, which is invalid. Future versions of Babel might fix this but for now we should turn off the TypeScript sourcemaps, so that the final build output is valid again.
@rwjblue using |
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.
Thank you @Turbo87
@rwjblue looks like CI is not building the production assets. should I modify the tests to skip then? |
We seem to use Babel to compile ES to AMD modules and that now includes ES modules there were originally written in TypeScript. The TypeScript compiler is apparently outputting sourcemaps by default, but it looks like Babel can't handle those properly. Instead Babel keeps the sourcemap comments inside of the AMD modules, which causes the final concatenated file to have multiple sourcemap comments, which is invalid. Future versions of Babel might fix this but for now we should turn off the TypeScript sourcemaps, so that the final build output is valid again.
Resolves #16881
/cc @rwjblue @buschtoens @gossi