Allow to specify filename of emitted CSS when build.cssCodeSplit: false
#4863
Closed
Description
Clear and concise description of the problem
When building in library mode for a .js
file that imports styles, Vite generates a style.css
file in the target directory alongside the .js
file.
Using build.lib.fileName we can already specify the filename for the .js
file. Currently there seems to be no way to specify the filename for the .css
file, as it always defaults to style.css
.
Suggested solution
Maybe a build.lib.fileNameCSS
option?
Alternative
A workaround is renaming the style.css
in a postbuild
script. But this isn't ideal since it involves yet another build step, and doing it in Vite itself would be more coherent.
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.