Dop4miN
Dop4miN

Reputation: 349

How to set up Babylon.js with npm?

I've made another post regarding Babylon.js with npm. Since I've got no answer so far, I'd like to ask differently: How would you set up Babylon.js step by step with npm - not with their CDN. I've went with their documentation as you can read in my mentioned post, but haven't been lucky.

Thanks in advance!

Upvotes: 1

Views: 692

Answers (1)

Raanan W
Raanan W

Reputation: 1295

I would recommend using the es6 modules instead of the regular babylon release.

The documentation can be found here:

https://doc.babylonjs.com/features/es6_support

The packages are all under @babylonjs (for example core - https://www.npmjs.com/package/@babylonjs/core ), and it supports tree shaking and other goodies.

If you do want to use the requirejs / amd version, you will need to use the babylonjs package, but from your other question, it seems to me like you are trying to use es6 modules (import instead of require), so this would be the best solution for you.

Upvotes: 1

Related Questions