ember-cli / ember-cli/broccoli-terser-sourcemap
Wrong path in sourcemap sources entry for chunks in assets dir
- Dominant language
- JavaScript
- Stars
- 10
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
`ember-auto-import`/`webpack` compiles vendor code into chunks in the `assets` directory in our project. Those files are then minimized using `ember-cli-terser`.
Since webpack is set to not build sourcemaps for those files, this plugin set the `sources` entry in the sourcemap to the `relativePath` of the file.
As an example, we get a sourcemap `/assets/chunk.123.map` with `"sources": "assets/chunk.123.js"`. This leads to some issues where external tools try to read those maps, since they cannot find `/assets/assets/chunk.123.js`. Should it rather be `"sources": "chunk.123.js"` in this case since the path is relative and the map is already located at `assets/`?
I attempted a fix here: https://github.com/dagroe/broccoli-terser-sourcemap/commit/5fe87d01c032c345b6a67b793bee6727d18fa3af
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.