Skip to content

Commit 5b4cc66

Browse files
authored
feat: use special cacheGroups to handle vanilla extract modules (#343)
1 parent da5a118 commit 5b4cc66

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

rsbuild/vanilla-extract/rsbuild.config.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@ export default defineConfig({
1010
},
1111
}),
1212
],
13+
performance: {
14+
chunkSplit: {
15+
override: {
16+
cacheGroups: {
17+
vanillaCss: {
18+
minSize: 0,
19+
chunks: 'all',
20+
test: /@vanilla-extract\/webpack-plugin/,
21+
priority: 1000,
22+
name: process.env.NODE_ENV === 'development' && 'vanilla-extract',
23+
},
24+
},
25+
},
26+
},
27+
},
1328
tools: {
1429
rspack: {
1530
plugins: [new VanillaExtractPlugin()],

0 commit comments

Comments
 (0)