-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
rollupOptions.output.assetFileNames does not work #2944
Comments
Confirm. assetFileNames works only with css. Other extensions puts inside asset folder and become with hash in name. |
@Alexufo @AlttiRi it would be good if you could test your projects against Vite with #4352 to confirm that this PR covers your use cases. |
@patak-js I am newbie to it.
|
Yes, but I think it is better to fork the vitejs/vite repo, clone that locally, and run:
or if you have https://cli.github.com/ installed, you can run directly
You can copy these commands from the PR, there is an Open With button at the right of the title. It is a good idea to have the main repo in case you later want to check other PRs, or be ready to contribute yourself if you find something later. Note: also a good read https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-for-a-fork |
@patak-js Yes, it works! All files become with name as set in assetFileNames mask. Fonts css ico. By the way, is it possible to put fonts to font folder? Fonts become as many files as usual and I prefer to put files to font folder and css and ico in root. |
Nice! Thanks for testing
Maybe you can specify a different folder depending on the ext of the file? You should join chat.vitejs.dev if you aren't there already, probably there are others that may have the same requirement to discuss with. |
@patak-js
Now assetsDir is ignored. I suppose it is a not a good. On this config files create in root folder. |
AFAICS this is expected @Alexufo, @SegaraRai would you re-check this also? |
@patak-js @Alexufo |
Ок. It should be a bit info in docs about it I suppose. |
Describe the bug
rollupOptions.output.assetFileNames
does not work.I have the start project with changed config:
The result build structure looks so:
![image](https://user-images.githubusercontent.com/16310547/114302717-e8887a00-9ad2-11eb-88f7-cba7b9927a02.png)
As you can see
assetFileNames
option was ignored forlogo.png
.See the related bug: #378 (comment)
Reproduction
yarn create @vitejs/app my-vue-app --template vue
and use the config above.
System Info
Before submitting the issue, please make sure you do the following
The text was updated successfully, but these errors were encountered: