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:
@@ -297,7 +297,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="./js/vtk-gltf.js"></script>
|
||||
<script src="./js/vtk-gltf.mjs"></script>
|
||||
|
||||
<script>
|
||||
// Get VTK.js classes
|
||||
|
||||
Reference in New Issue
Block a user