File tree 2 files changed +6
-5
lines changed
packages/create-plugin/src
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
import chalk from 'chalk' ;
2
2
import { UDPATE_CONFIG } from '../constants.js' ;
3
+ import { getConfig } from '../utils/utils.config.js' ;
3
4
import { printBlueBox , printRedBox } from '../utils/utils.console.js' ;
4
5
import { getOnlyExistingInCwd , removeFilesInCwd } from '../utils/utils.files.js' ;
5
6
import { updateGoSdkAndModules } from '../utils/utils.goSdk.js' ;
@@ -23,6 +24,10 @@ export const standardUpdate = async () => {
23
24
await updateGoSdkAndModules ( process . cwd ( ) ) ;
24
25
25
26
const filesToRemove = getOnlyExistingInCwd ( UDPATE_CONFIG . filesToRemove ) ;
27
+
28
+ if ( Boolean ( getConfig ( ) . features . useExperimentalRspack ) ) {
29
+ filesToRemove . push ( './config/webpack' ) ;
30
+ }
26
31
if ( filesToRemove . length ) {
27
32
removeFilesInCwd ( filesToRemove ) ;
28
33
}
Original file line number Diff line number Diff line change 1
1
import path from 'node:path' ;
2
2
import { fileURLToPath } from 'node:url' ;
3
- import { getConfig } from './utils/utils.config.js' ;
4
3
5
4
const __dirname = fileURLToPath ( new URL ( '.' , import . meta. url ) ) ;
6
5
@@ -87,10 +86,7 @@ export const UDPATE_CONFIG = {
87
86
// Files that should be overriden between configuration version updates.
88
87
filesToOverride : [ '.config/' , '.cprc.json' ] ,
89
88
// Files that are no longer needed for the project and can be removed.
90
- filesToRemove : [
91
- '.config/webpack/publicPath.ts' ,
92
- ...( Boolean ( getConfig ( ) . features . useExperimentalRspack ) ? [ './config/webpack' ] : [ './config/rspack' ] ) ,
93
- ] ,
89
+ filesToRemove : [ '.config/webpack/publicPath.ts' ] ,
94
90
} ;
95
91
96
92
// prettier-ignore
You can’t perform that action at this time.
0 commit comments