Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroborges committed Sep 17, 2024
1 parent 7f1b5dc commit 02ca6d0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/svelte/src/lib/createInertiaApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,14 @@ export default async function createInertiaApp({
})
}

async function dynamicImport(modulePath: string) {
/**
* Loads the module dynamically during execution instead of at build time.
*
* The @vite-ignore directive prevents Vite from analyzing or pre-bundling this import.
**/
async function dynamicImport(module: string) {
try {
return await import(/* @vite-ignore */ modulePath)
return await import(/* @vite-ignore */ module)
} catch {
return null
}
Expand Down

0 comments on commit 02ca6d0

Please sign in to comment.