Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions resources/js/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import { createApp, h } from 'vue';
import { ZiggyVue } from 'ziggy-js';
import { initializeTheme } from './composables/useAppearance';

// VS Code warning: "File 'vite/client.d.ts' is not a module" (TS2306)
// This import is still safe to use for type support in Vite projects.
// See related Vite issue: https://github.com/vitejs/vite/issues/5370

// Extend ImportMeta interface for Vite...
declare module 'vite/client' {
interface ImportMetaEnv {
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@
},
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */

// "types": ["vue/tsx"] // Causes warning if '@vue/tsx-jsx' is not installed, which it appears is not installed by default
"types": [
"vite/client",
"vue/tsx",
"./resources/js/types"
] /* Specify type package names to be included without being referenced in a source file. */,

// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
Expand Down