Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged PR 87620: Fix src map generation to for debugging source outsi…
…de of imjs monorepo Inline ts sources into *.js.map files. The change is trying to solve the issue of being able to properly debug the source mapped back to Typescript when outside of the iModel.js repo since the switch to react-scripts based build. This was previously possible because each individually webpack-ed package was doing exactly this but within the webpacked bundle that we delivered with the modules. There are a few approaches here in order to get full TS debugging, 1. Inlining (like this PR does) 1. Resolving the "sourceFile", that the sourceMap is mapping to, from a GitHub url for that specific version. This would effectively have the user, when resolving the source maps pull the original typescript from GitHub This is complicated for a number of reason, (1) how would we ensure versions are correctly mapped, (2) right now we do not publish all package versions to GitHub so internal consumers would be out of luck for the most part and (3) getting that to work would take a lot of time investment. With the above as the only 2 approaches available right now, we're going to go with 1. The consequences of this is it will increase our package sizes again (:() but a necessary evil in order to make the library easier to use as an outside developer. Some analysis on the package sizes as a result of this change: - Pre-2.0: - package size: 2.9 MB - unpacked size: 13.8 MB - Post-2.0 w/o sourcemaps: - package size: 1.6 MB - unpacked size: 7.9 MB - Post-2.0 w/ sourcemaps: - package size: 2.4 MB - unpacked size: 11.3 MB
- Loading branch information