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

Using rollup-plugin-external-assets results in empty source map files #75

Closed
rickharris opened this issue Mar 26, 2024 · 1 comment
Closed

Comments

@rickharris
Copy link

I put a small test case together to show the issue: https://github.com/rickharris/rollup-external-assets-sourcemap-test

The repo has two source files without-assets.js and with-assets.js, the latter imports a png. The two files have two separate rollup configs, that are identical except the one for with-assets.js uses rollup-plugin-external-assets to copy & mark the asset it imports as external.

When built, the file without-assets.js.map file has all the information you'd expect in a source map:

{"version":3,"file":"without-assets.js","sources":["../without-assets.js"],"sourcesContent":["import { log } from \"console\";\n\nlog(\"HELLO\");\n"],"names":[],"mappings":";;AAEA,GAAG,CAAC,OAAO,CAAC"}

For the file that is built with rollup-plugin-external-assets in the plugins list, the source map file is still present but lacks any actual mapping information:

{"version":3,"file":"with-assets.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}

Hope this helps!

recursive-beast added a commit that referenced this issue Apr 13, 2024
fix: closes #75, using plugin results in empty source map files
github-actions bot pushed a commit that referenced this issue Apr 13, 2024
## [4.1.1](v4.1.0...v4.1.1) (2024-04-13)

### Bug Fixes

* closes [#75](#75), using plugin results in empty source map files ([99416de](99416de))
@recursive-beast
Copy link
Owner

recursive-beast commented Apr 13, 2024

@rickharris Fixed! Thank you for pointing this out, and also for providing an example demonstrating the issue, really appreciate it.

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

2 participants