Skip to content

Commit 00880b4

Browse files
committed
fix
1 parent 98d7fe0 commit 00880b4

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

packages/cli/commands/create.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)