@samitouri / QOSami-HFS / commits / 6c47834d

fix: server_code unload was not working

Massimo Melina committed May 16, 2024 at 00:01 UTC 6c47834da25fb777922bb70268cece752b29155b
1 file changed +2
src/plugins.ts
+2
@@ -220,6 +220,8 @@ export class Plugin implements CommonPluginInterface {
220
221 export const SERVER_CODE_ID = '.' // a name that will surely be not found among plugin folders
222 const serverCode = defineConfig('server_code', '', async (script, { k }) => {
223 + try { (await serverCode.compiled())?.unload() }
224 + catch {}
225 const res: any = {}
226 try {
227 new Function('exports', script)(res) // parse