Importing non-minified NPM packages always seems to load the minified version of BJS (?)

Hello! For debugging purposes, I want to import only the non-minified versions in my app. I’ve included them (in Electron) as follows:


All of them should be the development version, i.e. not minified. I now observe the following:

  • If I require ONLY babylon.max, the correct (non-minified) version is loaded
  • As soon as I require any one of the other packages, even the non-minified version, the minified version of babylon itself is loaded
  • Inside, for example, babylon.gui I see only babylonjs being loaded, but not babylonjs.max

This seems like an oversight, or perhaps I’m just misunderstanding how to use those packages? I’m pretty new to nodeJS so that might well be it.

This is totally expected as the other packages have a dependency on “babylonjs” so minified here.

You would need some kind of redirect from “babylonjs” to “babylonjs/babylon.max” to make it work.

In your case it might be simpler to:

  1. rely on the provided source maps
  2. or switch to the es6 version of Babylon