Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eb4046f

Browse files
authored
fix: disable jiti's moduleCache (#2075)
1 parent 9153dd3 commit eb4046f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/slidev/node/utils.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ type Token = ReturnType<MarkdownIt['parseInline']>[number]
1010
type Jiti = ReturnType<typeof createJiti>
1111
let jiti: Jiti | undefined
1212
export function loadModule<T = unknown>(absolutePath: string): Promise<T> {
13-
jiti ??= createJiti(fileURLToPath(import.meta.url))
13+
jiti ??= createJiti(fileURLToPath(import.meta.url), {
14+
// Allows changes to take effect
15+
moduleCache: false,
16+
})
1417
return jiti.import(absolutePath) as Promise<T>
1518
}
1619

0 commit comments

Comments
 (0)