Closed patrik-sticha closed 2 years ago
You can configure that with build.rollupOptions.assetFileNames
and build.rollupOptions.chunkFileNames
@bluwy Actually I can't, when I use plug-ins like for legacy assets (as mentioned above), resulting files still have the hash appended and there is no option currently to get rid of it.
According to the code, plugin-legacy should respect the assetFIlesNames and chunkFileNames configuration too though:
Perhaps there's a bug somewhere within it?
Clear and concise description of the problem
I would like to use Vite as a build tool not only for standalone apps, but for building assets-only, for example to build CSS and JS files for websites running on PHP with no HTML files. In that case Vite is currently unusable, as it always appends hash to generated files, thus those files can not be hard-linked from outside the Vite project.
Suggested solution
Solution would be to provide an option to vite.config not to use hashes at all and generate file names "as is", without change.
Alternative
No response
Additional context
There have been partial solutions for this issue, but none of those is working on "config-level", or supporting files generated by vite plugins - e.g. vitejs/plugin-legacy, wich makes those solutions unusable as well.
Validations