add cache bust param to index.js of esmodule plugins

should fix hot reload
This commit is contained in:
AAGaming
2024-09-11 19:38:58 -04:00
parent 6b78e0ae9c
commit 1d7af36a2b
+1 -1
View File
@@ -421,7 +421,7 @@ class PluginLoader extends Logger {
try {
switch (loadType) {
case PluginLoadType.ESMODULE_V1:
const plugin_exports = await import(`http://127.0.0.1:1337/plugins/${name}/dist/index.js`);
const plugin_exports = await import(`http://127.0.0.1:1337/plugins/${name}/dist/index.js?t=${Date.now()}`);
let plugin = plugin_exports.default();
this.plugins.push({