Rename viewer bundles .js -> .mjs so they stop leaking into the main realm
ComfyUI auto-imports every web/**/*.js into the shared main page; the four big bundles (three, vtk-gltf, viewer-bundle-vtk, gsplat) only ever run inside the viewer iframes but were getting pulled into the main document too, where they wrote window.THREE / window.vtk / globalThis.* and could collide with any other 3D pack. The **/*.js glob only matches .js, so renaming to .mjs drops them from the auto-import while the iframes still load them via classic <script src> (mime resolves to text/javascript). window.* pollution from these bundles is gone from the main realm.
This commit is contained in:
@@ -439,7 +439,7 @@
|
||||
}
|
||||
|
||||
var bundleScript = document.createElement('script');
|
||||
bundleScript.src = baseUrl + 'js/viewer-bundle-three.js';
|
||||
bundleScript.src = baseUrl + 'js/viewer-bundle-three.mjs';
|
||||
bundleScript.onload = function() {
|
||||
console.log('[FBX Debug Viewer] Three.js bundle loaded from:', bundleScript.src);
|
||||
initViewer();
|
||||
|
||||
Reference in New Issue
Block a user