-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed
Labels
Description
Describe the bug
Hello! I have a pretty basic vite.config.ts. Main area of interest is this:
build: {
rollupOptions: {
input: {
"my-app": resolve(__dirname, "index.html"),
},
}
}
With Vite 2.x, it would produce this output:
dist/index.html
dist/assets/my-app.<hash>.css
dist/assets/my-app.<hash>.js
After upgrading to Vite 3 it changed to this:
dist/index.html
dist/assets/index.<hash>.css
dist/assets/my-app.<hash>.js
Is that change intentional? Is there an easy way to get this behavior back, beyond adding a hack in assetFileNames?
Thanks!
Reproduction
https://stackblitz.com/edit/vitejs-vite-r2ykgd?file=vite.config.js
System Info
System:
OS: Windows 10 10.0.19044
CPU: (4) x64 Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz
Memory: 5.73 GB / 23.84 GB
Binaries:
Node: 16.14.2 - C:\Program Files\nodejs\node.EXE
npm: 8.5.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 104.0.5112.102
Edge: Spartan (44.19041.1266.0), Chromium (104.0.1293.63)
Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
milahu, aboutsimon, ianwitherow and hputzek