File tree 2 files changed +10
-1
lines changed
packages/vite/src/node/plugins
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -568,7 +568,7 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
568
568
let chunkCSS = ''
569
569
// the chunk is empty if it's a dynamic entry chunk that only contains a CSS import
570
570
const isJsChunkEmpty = code === '' && ! chunk . isEntry
571
- let isPureCssChunk = true
571
+ let isPureCssChunk = chunk . exports . length === 0
572
572
const ids = Object . keys ( chunk . modules )
573
573
for ( const id of ids ) {
574
574
if ( styles . has ( id ) ) {
Original file line number Diff line number Diff line change @@ -24,5 +24,14 @@ export default defineConfig({
24
24
} ,
25
25
build : {
26
26
sourcemap : true ,
27
+ rollupOptions : {
28
+ output : {
29
+ manualChunks ( id ) {
30
+ if ( id . includes ( 'foo.css' ) ) {
31
+ return 'foo_css'
32
+ }
33
+ } ,
34
+ } ,
35
+ } ,
27
36
} ,
28
37
} )
You can’t perform that action at this time.
0 commit comments