-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed
Description
Clear and concise description of the problem
I enabled preserveModules and cssCodeSplit in library mode.
But css files don't follow the preserveModules rule, use the original module name as the file name.
related code:
vite/packages/vite/src/node/plugins/css.ts
Lines 461 to 464 in 1ffc010
const fileHandle = this.emitFile({ | |
name: chunk.name + '.css', | |
type: 'asset', | |
source: chunkCSS |
Suggested solution
I want to use the original module name as the file name as required by preserveModules when cssCodeSplit is enabled.
Alternative
No response
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.
IOuser, roginfarrer, Dunqing, gyurielf, kindoflew and 2 more