@@ -39,6 +39,7 @@ const TS_CONFIG_SCHEMA = z.object({
39
39
} )
40
40
41
41
export async function detectFrameworkConfigFiles ( cwd : string ) : Promise < Framework | null > {
42
+ const packageInfo = await getPackageInfo ( cwd , false )
42
43
const configFiles = await glob ( '**/{nuxt,vite,astro}.config.*|composer.json' , {
43
44
cwd,
44
45
deep : 3 ,
@@ -61,6 +62,11 @@ export async function detectFrameworkConfigFiles(cwd: string): Promise<Framework
61
62
return FRAMEWORKS . laravel
62
63
}
63
64
65
+ if ( packageInfo ?. dependencies ?. [ '@inertiajs/vue3' ]
66
+ || packageInfo ?. devDependencies ?. [ '@inertiajs/vue3' ] || ( await fs . pathExists ( path . join ( cwd , 'resources/js' ) ) ) ) {
67
+ return FRAMEWORKS . inertia
68
+ }
69
+
64
70
// Check for Vite
65
71
if ( configFiles . find ( file => file . startsWith ( 'vite.config.' ) ) ) {
66
72
return FRAMEWORKS . vite
@@ -101,10 +107,6 @@ export async function getProjectInfo(cwd: string): Promise<ProjectInfo | null> {
101
107
getPackageInfo ( cwd , false ) ,
102
108
] )
103
109
104
- const isUsingAppDir = await fs . pathExists (
105
- path . resolve ( cwd , `app` ) ,
106
- )
107
-
108
110
const type : ProjectInfo = {
109
111
framework : detectedFramework || FRAMEWORKS . manual ,
110
112
typescript,
@@ -209,9 +211,11 @@ export async function getTsConfigAliasPrefix(cwd: string) {
209
211
? './.nuxt/tsconfig.app.json'
210
212
: detectedFramework ?. name === 'nuxt3'
211
213
? './.nuxt/tsconfig.json'
212
- : isTypeScript
213
- ? './tsconfig.json'
214
- : './jsconfig.json' )
214
+ : detectedFramework ?. name === 'inertia'
215
+ ? './inertia/tsconfig.json'
216
+ : isTypeScript
217
+ ? './tsconfig.json'
218
+ : './jsconfig.json' )
215
219
216
220
if (
217
221
tsConfig === null
0 commit comments