dev: better bun support
Massimo Melina committed
May 19, 2023 at 15:24 UTC
224ea4731486015f2b3429129c8eeadd9a4f1a2b
1 file changed
+2
src/plugins.ts
+2
@@ -315,6 +315,8 @@ function loadPlugin(id: string, path: string) {
315
316
function deleteModule(id: string) {
317
const { cache } = require
318
+ if (!cache) // bun 0.6.2 doesn't have it
319
+ return console.warn("plugin may be not reloaded correctly")
320
// build reversed map of dependencies
321
const requiredBy: Record<string,string[]> = { '.':['.'] } // don't touch main entry
322
for (const k in cache)