Skip to content
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

Wrong path in sourcemap sources entry for chunks in assets dir #311

Open
dagroe opened this issue Apr 5, 2023 · 0 comments
Open

Wrong path in sourcemap sources entry for chunks in assets dir #311

dagroe opened this issue Apr 5, 2023 · 0 comments

Comments

@dagroe
Copy link

dagroe commented Apr 5, 2023

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: dagroe@5fe87d0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant