My dev build runs fine locally but when I build for production I get the following errors:
bundle.js:11 BJS - [10:11:02]: Error running tasks-done callbacks.
bundle.js:11 ShadowGeneratorSceneComponent needs to be imported before as it contains a side-effect required by your code.
I’ve tried explicitly importing ShadowGeneratorSceneComponent
and all Shadows modules but that didn’t help.
EDIT: Related Issue with babylonjs/core package and UniversalCamera
EDIT 2: When I comment out the shadow generation code, I’m now getting the same error but with LensFlareSystem
i.e.
LensFlareSystemSceneComponent needs to be imported before as it contains a side-effect required by your code.
When I comment out both the ShadowGenerator
and LensFlareSystem
code, it builds and runs fine on production.