build: reach Navara only through import() and ship its worker wasm

The import-direction check now tells dynamic imports apart
(analyzeModule(source, { dynamic: true })) and rejects any static import
or re-export of src/globe/navara/** from outside that directory, so the
Navara engine can only be a lazily loaded chunk of the app.

Navara's prebuilt workers load their wasm by file name next to
themselves, which the bundler cannot see; a build-only Rollup plugin
copies the missing ones (draco decoder, font worker) into assets/ when
the bundle includes Navara, and adds nothing to a build without it.
This commit is contained in:
German Khokhlov committed 2026-10-15 20:56:06 +04:00
1 parent 72fec292d4
commit 306e3e9467
8 files changed
+179 -7

No files matched your search

+2 -1
View File
@@ -33,7 +33,8 @@
"build/application-html.js",
"build/allowedHosts.js",
"build/embed-framing.js",
"build/panel.js"
"build/panel.js",
"build/navaraAssets.js"
],
"external": ["vite-plugin-cesium"]
},