Why is babylonjs a dev dependency when using es6 with npm?

Can anyone explain why, when using es6 with npm, babylonjs is added as a dev-dependency, whereas with es5, its added as a regular dependency?

Compare instructs for es6:


which has the line:

npm install --save-dev @babylonjs/core

Whereas in es5:



npm install --save babylonjs

good question for @sebavan

I feel like it is because ES6 will let you bundle bjs in your code so this is not something you need when running your project as it will already be in?

Most of the time in es6 builds, you are creating a bundle so part of your library will be included in the result bundle so when using the output of your app you do not need the dependency anymore (except if you were building a library and not an app)

With es5 the common case is to load the library from the server so it is common to still require it at run time.

I guess that makes sense. Thanks!