Skip to content

Commit 9bb73f6

Browse files
committed
feat(framework): add framework detection and shim installation during project setup
1 parent 497308d commit 9bb73f6

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

packages/cli/src/create/bin.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import mri from 'mri';
66

77
import { vitePlusHeader } from '../../binding/index.js';
88
import {
9+
addFrameworkShim,
10+
detectFramework,
11+
hasFrameworkShim,
912
installGitHooks,
1013
rewriteMonorepo,
1114
rewriteMonorepoProject,
@@ -968,6 +971,10 @@ Use \`vp create --list\` to list all available templates, or run \`vp create --h
968971
} else {
969972
updateCreateProgress('Applying Vite+ project setup');
970973
rewriteStandaloneProject(fullPath, workspaceInfo, undefined, compactOutput);
974+
const createdFramework = detectFramework(fullPath);
975+
if (createdFramework && !hasFrameworkShim(fullPath, createdFramework)) {
976+
addFrameworkShim(fullPath, createdFramework);
977+
}
971978
if (shouldSetupHooks) {
972979
installGitHooks(fullPath, compactOutput);
973980
}

0 commit comments

Comments
 (0)