File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
packages/cli/uni-builder/src/shared/plugins Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @modern-js/uni-builder ' : patch
3
+ ---
4
+
5
+ fix: compat chain.cache true
Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ export const pluginFrameworkConfig = (configPath: string): RsbuildPlugin => ({
6
6
7
7
setup ( api ) {
8
8
api . modifyBundlerChain ( chain => {
9
- if ( ! fs . existsSync ( configPath ) ) {
9
+ // TODO: Support rspack after support `performance.buildCache.buildDependencies` configuration
10
+ if ( ! fs . existsSync ( configPath ) || api . context . bundlerType !== 'webpack' ) {
10
11
return ;
11
12
}
12
13
@@ -16,6 +17,14 @@ export const pluginFrameworkConfig = (configPath: string): RsbuildPlugin => ({
16
17
return ;
17
18
}
18
19
20
+ if ( cache === true ) {
21
+ chain . cache ( {
22
+ buildDependencies : {
23
+ frameworkConfig : [ configPath ] ,
24
+ } ,
25
+ } ) ;
26
+ }
27
+
19
28
cache . buildDependencies = {
20
29
...cache . buildDependencies ,
21
30
frameworkConfig : [ configPath ] ,
You can’t perform that action at this time.
0 commit comments