-
-
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
Web Worker imports don't respect rollupOptions.output.assetFileNames on build #7613
Comments
Hi @tarngerine on StackBlitz the vite.config.js file seems missing (link: https://stackblitz.com/edit/vitejs-vite-wywvny?file=vite.config.js). Did you mean it like this: export default {
build: {
rollupOptions: {
output: {
assetFileNames: "[name].[ext]"
}
}
}
} |
were you able to repro @famoser ? thanks! https://stackblitz.com/edit/vitejs-vite-wywvny?file=vite.config.js |
You can use |
@tarngerine I have a similar problem that assetFileNames is not applied in all (by myself) expected cases, but not exactly the same. As soon as I have a clean repro I'll probably create a new issue to avoid highjacking this one. |
You mean like this: https://stackblitz.com/edit/vitejs-vite-p9bztw?file=vite.config.js |
I've looked into this a while now; there seem to be multiple issues like this. Similar problems are unresolved with the legacy plugin: See #4628 and #6923. In at least one special case, specifically defining the naming of the vite/packages/plugin-legacy/index.js Line 592 in 7ddbf96
In a local project of mine, without the legacy plugin & very similar config as the initial repro of this issue, the configuration option in |
Describe the bug
[name].[hash].[ext]
rollupOptions.output.assetFileNames
(and entry/chunkFileNames):[name].[ext]
we can remove the hashingRepro:
yarn build
/dist/assets
folder outputExpected:
Actual:
Reproduction
https://stackblitz.com/edit/vitejs-vite-wywvny?file=vite.config.js
System Info
envinfo doesn't work on Stackblitz, but whatever is the default from the linked `vanilla` example on Vite docs
Used Package Manager
npm
Logs
The text was updated successfully, but these errors were encountered: