fix: server_code unload was not working

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