@@ -206,32 +206,6 @@ async function updateLayoutFile(cwd: string, spinner: Ora) {
206
206
}
207
207
}
208
208
209
- async function updateImportPaths ( cwd : string , spinner : Ora ) {
210
- try {
211
- spinner . text = 'Updating import paths...' ;
212
- const files = await glob ( [ '**/*.{ts,tsx,js,jsx}' ] , {
213
- cwd,
214
- ignore : [ 'node_modules/**' , 'dist/**' , 'build/**' , '.expo/**' ] ,
215
- } ) ;
216
-
217
- for ( const file of files ) {
218
- const filePath = path . join ( cwd , file ) ;
219
- const content = await fs . readFile ( filePath , 'utf8' ) ;
220
- const updatedContent = content
221
- . replace ( / ( f r o m \s + [ ' " ] ) @ \/ ( .* ?[ ' " ] ) / g, '$1~/$2' )
222
- . replace ( / ( i m p o r t \s + [ ' " ] ) @ \/ ( .* ?[ ' " ] ) / g, '$1~/$2' ) ;
223
-
224
- if ( content !== updatedContent ) {
225
- await fs . writeFile ( filePath , updatedContent ) ;
226
- spinner . text = `Updated imports in ${ file } ` ;
227
- }
228
- }
229
- } catch ( error ) {
230
- spinner . fail ( 'Failed to update import paths' ) ;
231
- handleError ( error ) ;
232
- }
233
- }
234
-
235
209
async function shouldPromptGitWarning ( cwd : string ) : Promise < boolean > {
236
210
try {
237
211
execSync ( 'git rev-parse --is-inside-work-tree' , { cwd } ) ;
@@ -292,7 +266,6 @@ async function initializeProject(cwd: string, overwrite: boolean) {
292
266
await copyTemplateFile ( file , templatesDir , cwd , spinner , overwrite ) ;
293
267
}
294
268
295
- await updateImportPaths ( cwd , spinner ) ;
296
269
await updateLayoutFile ( cwd , spinner ) ;
297
270
298
271
spinner . succeed ( 'Initialization completed successfully!' ) ;
0 commit comments