Babylon.js project using typescript, webpack, es6 modules and other goodies

Hi gang,

We had quite a lot of questions about babylon.js project issues, mainly regarding modules and webpack. How to build, how do debug, how to get started.

So I made a small getting-started project that can be forked and can be used as the base to your new es6 project. It is available on github:

It is basically everything you need to get started - debug environment, typescript hot-loading, full module support, production build and more.

For now it is a very simple project - a plane, a sphere, and a single texture. I will continue adding features with time - model loading, custom materials, physics, XR, with focus on how to use them in an es6 project.

If you find a bug or have any questions or issues you can write me here or write an issue on github.


Very good idea!

I also have a BJS + TS + webpack + PUG + SCSS with hot reloading etc starter repo that I’ve shared before. Maybe we can combine best of both?

One thing I found with just using a pure TS project was that hot reloading gets quite slow as project size increases. So I added in babel and have separate script for checking types with tsc, relying on IDE type checks during iterative dev and that works better for me.

Maybe there’s a way to ensure TS only isn’t too slow with hot reloading on larger projects, but I haven’t found it yet.

I accept PRs!

Having said that, I don’t see why PUG and SCSS are needed in this project. I am trying to show how to use babylon’s es6 modules, and less how to create a website. Keep it as simple as possible, and focus on the babylon side of things :slight_smile:

This is just part 1 of others to come. some of them will probably be integration with other frameworks (react, angular, etc’), but as I said, this will take time.


We need to link it from the doc as well :wink:

1 Like