What is the best way to import the babylon files?

I’m new to Babylon and I’m currently following the tutorial here. However, I have a few doubts regarding importing the babylon.js files. Should I install them using NPM and import them in my index.ts or should I just use the CDN imports in the HTML?

Also, If I use the CDN imports, will I have to download the type definitions for all Babylon packages that I need to use?

Hey and welcome!!

It is actually up to you :slight_smile:
If you use npm, they will all come with the d.ts you need :slight_smile:

I will probably recommend using NPM of ES6 packages so you can treeshake and reduce the download size (ES6 - Babylon.js Documentation)

1 Like