agentgui 1.0.426 → 1.0.427
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server.js +1 -0
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -3174,6 +3174,7 @@ function serveFile(filePath, res, req) {
|
|
|
3174
3174
|
let content = data.toString();
|
|
3175
3175
|
const baseTag = `<script>window.__BASE_URL='${BASE_URL}';</script>`;
|
|
3176
3176
|
content = content.replace('<head>', '<head>\n ' + baseTag);
|
|
3177
|
+
content = content.replace(/(href|src)="vendor\//g, `$1="${BASE_URL}/vendor/`);
|
|
3177
3178
|
if (watch) {
|
|
3178
3179
|
content += `\n<script>(function(){const ws=new WebSocket((location.protocol==='https:'?'wss://':'ws://')+location.host+'${BASE_URL}/hot-reload');ws.onmessage=e=>{if(JSON.parse(e.data).type==='reload')location.reload()};})();</script>`;
|
|
3179
3180
|
}
|