File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -374,16 +374,27 @@ export async function createVirtualWorkspace({
374374 }
375375
376376 const tentativeWorkspace = await createWorkspace ( { cwd, packageManager, override } ) ;
377+ const resolvedCwd = path . resolve ( cwd ) ;
378+
379+ // This is not linked with typescript detection
380+ const viteConfigPath = path . join ( resolvedCwd , commonFilePaths . viteConfigTS ) ;
381+ const viteConfig = fs . existsSync ( viteConfigPath )
382+ ? commonFilePaths . viteConfigTS
383+ : commonFilePaths . viteConfig ;
384+ const svelteConfigPath = path . join ( resolvedCwd , commonFilePaths . svelteConfigTS ) ;
385+ const svelteConfig = fs . existsSync ( svelteConfigPath )
386+ ? commonFilePaths . svelteConfigTS
387+ : commonFilePaths . svelteConfig ;
377388
378389 const virtualWorkspace : Workspace = {
379390 ...tentativeWorkspace ,
380391 typescript : type === 'typescript' ,
381392 files : {
382393 ...tentativeWorkspace . files ,
383- viteConfig : type === 'typescript' ? commonFilePaths . viteConfigTS : commonFilePaths . viteConfig ,
384- svelteConfig :
385- type === 'typescript' ? commonFilePaths . svelteConfigTS : commonFilePaths . svelteConfig
386- }
394+ viteConfig,
395+ svelteConfig
396+ } ,
397+ dependencyVersion : ( ) => undefined
387398 } ;
388399
389400 return virtualWorkspace ;
You can’t perform that action at this time.
0 commit comments