Skip to content

Commit b2e8ffa

Browse files
Move to custom declariton file for tsconfig
1 parent 5d0f78f commit b2e8ffa

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

resources/js/app.ts

-13
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,6 @@ import { createApp, h } from 'vue';
77
import { ZiggyVue } from '../../vendor/tightenco/ziggy';
88
import { initializeTheme } from './composables/useAppearance';
99

10-
// Extend ImportMeta interface for Vite...
11-
declare module 'vite/client' {
12-
interface ImportMetaEnv {
13-
readonly VITE_APP_NAME: string;
14-
[key: string]: string | boolean | undefined;
15-
}
16-
17-
interface ImportMeta {
18-
readonly env: ImportMetaEnv;
19-
readonly glob: <T>(pattern: string) => Record<string, () => Promise<T>>;
20-
}
21-
}
22-
2310
const appName = import.meta.env.VITE_APP_NAME || 'Laravel';
2411

2512
createInertiaApp({

resources/js/types/vite.d.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
declare module 'vite/client' {
2+
interface ImportMetaEnv {
3+
readonly VITE_APP_NAME: string;
4+
[key: string]: string | boolean | undefined;
5+
}
6+
7+
interface ImportMeta {
8+
readonly env: ImportMetaEnv;
9+
readonly glob: <T>(pattern: string) => Record<string, () => Promise<T>>;
10+
}
11+
}

0 commit comments

Comments
 (0)