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

Rollup generates malformed URL with import.meta.ROLLUP_FILE_URL if asset name contains % #5442

Open
sapphi-red opened this issue Mar 23, 2024 · 1 comment

Comments

@sapphi-red
Copy link
Contributor

Rollup Version

4.13.0

Operating System (or Browser)

Stackblitz

Node Version (if applicable)

No response

Link To Reproduction

https://stackblitz.com/edit/rollup-repro-xuenud?file=rollup.config.js

Expected Behaviour

Rollup does not generate a malformed URL. So the output is var main = new URL('assets/te%252-C4X7hChn.txt', import.meta.url).href;.

Actual Behaviour

Rollup generates a malformed URL. So the output is var main = new URL('assets/te%2-C4X7hChn.txt', import.meta.url).href;.

@sapphi-red
Copy link
Contributor Author

Adding % to the default sanitizeFileName (related: #5441) seems to work for this issue as well.

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

No branches or pull requests

1 participant