Skip to content

Conversation

BPScott
Copy link
Contributor

@BPScott BPScott commented Sep 26, 2025

The current check for "you can't have absolute or relative paths in the filename property" makes it impossible to create the filename .vite/stats.html even though that not a relative path and thus is a valid filename to pass into emitFile.

This PR updates the check so the relative path checks looks for files that start with ./ or ../ rather than any filename that starts with a .

@btd
Copy link
Owner

btd commented Sep 29, 2025

Thank you for PR, Does it work on windows?

@BPScott
Copy link
Contributor Author

BPScott commented Sep 29, 2025

@btd Thanks for the callout. It looks like Rollup doesn't normalize paths. I've updated to an approach using a regex that checks for ./, ../, .\ and ..\.

I've not got a windows machine to easily test this on.

@btd btd merged commit a6c0543 into btd:master Oct 2, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants