There was an error while loading. Please reload this page.
1 parent ce7d174 commit 7d3005dCopy full SHA for 7d3005d
2 files changed
scripts/generate-plugin.ts
@@ -51,10 +51,10 @@ const nodeProvider: PluginDiscoveryProvider = async () => {
51
const dir = path.join(process.cwd(), 'src/plugins')
52
const files = await fs.readdir(dir, { recursive: true })
53
54
- const mods: Record<string, () => Promise<PluginModule>> = {}
+ const mods: Record<string, PluginModule> = {}
55
for (const file of files) {
56
if (file.endsWith('.ts')) {
57
- mods[file] = () => import(path.join(dir, file))
+ mods[file] = await import(path.join(dir, file))
58
}
59
60
return mods
tsconfig.node.json
@@ -15,6 +15,6 @@
15
16
"module": "ESNext",
17
"moduleResolution": "Bundler",
18
- "types": ["node"]
+ "types": ["node", "vite/client"]
19
20
0 commit comments