Can't serialize the scene

Hi all,

I have problem when i try to serialize the scene, i got this error:
image

In this case, I’m trying to reduce the size of the babylon js file by importing only the used modules and merging them into one file. but I got the above error when I tried to serialize scene

Sample code : BabylonJS - Scene Serializer Test - StackBlitz
Module bundler: GitHub - rifkyalfares/optimize-babylonjs-modules: To reduce the size of the babylon js file by only importing the modules used and merging them into one file

How to fix this error ?

Thanks all :slight_smile:

I think you will need to import "Physics/physicsEngineComponent" when you create the babylonjs-optimized.js file.

2 Likes

Thanks @Evgeni_Popov , it solved my problem :slight_smile: