cesium
cesium copied to clipboard
Extra package.jsons in npm pack
There are some extra package.json
files that are being published to NPM now (1.96) from the Workers directory. Is this intentional?
/tmp/test-cesium-1.96/node_modules/cesium$ find . -name 'package.json'
./Source/ThirdParty/Workers/package.json
./Source/Workers/package.json
./package.json
./Build/Cesium/ThirdParty/Workers/package.json
./Build/Cesium/Workers/package.json
./Build/CesiumUnminified/ThirdParty/Workers/package.json
./Build/CesiumUnminified/Workers/package.json
./Build/package.json
vs
tmp/test-cesium-1.95/node_modules/cesium$ find . -name 'package.json'
./package.json
./Build/package.json
@chris-cooper I believe this is intentional because we want the workers to be considered CommonJS rather than ES modules.
@ggetz Could you confirm?
Yes, this uses the type
field (only used by NodeJS, not npm) to specify how the worker files are loaded. Specifically, this is needed due to the inclusion of requireJS
in cesiumWorkerBootstrapper
. Once workers can be overhauled and requireJS is no longer needed (waiting on https://bugzilla.mozilla.org/show_bug.cgi?id=1247687), then we should be able to remove this.
I'm going to go ahead and close this, but if you think there's an issue with this, please feel free to re-open. Thanks!