From 26189fd61f7654f16e6f751da7673742862b8024 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 6 Jun 2024 15:44:28 +0800 Subject: [PATCH] feat: Clear modules before loading shared library Clear the modules before loading the shared library to ensure a clean state. This is necessary to avoid any conflicts or issues with previously loaded modules. --- script/script.go | 1 + 1 file changed, 1 insertion(+) diff --git a/script/script.go b/script/script.go index 2c8c08a6..68cfd3dd 100644 --- a/script/script.go +++ b/script/script.go @@ -11,6 +11,7 @@ import ( // Load 加载共享库 func Load(cfg config.Config) error { + v8.CLearModules() exts := []string{"*.js", "*.ts"} err := application.App.Walk("scripts", func(root, file string, isdir bool) error { if isdir {