# What is the best development pipeline for developing with Babylon.Js

**URL:** <https://forum.babylonjs.com/t/what-is-the-best-development-pipeline-for-developing-with-babylon-js/17259>\
**Category:** Questions\
**Created:** [January 7, 2021, 9:04am UTC](https://forum.babylonjs.com/t/what-is-the-best-development-pipeline-for-developing-with-babylon-js/17259 "2021-01-07T09:04:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eco\_Editor](https://avatars.discourse-cdn.com/v4/letter/e/a5b964/32.png) [@Eco\_Editor](https://forum.babylonjs.com/u/Eco_Editor)\
**Post date:** [January 7, 2021, 9:04am UTC](https://forum.babylonjs.com/t/what-is-the-best-development-pipeline-for-developing-with-babylon-js/17259/1 "2021-01-07T09:04:14Z")

</div>

Hello everybody,

I know this is a very general question and there maybe several answer to it. I’ve been playing around with Babylon.js and web development for the last few weeks and and its a really great platform, so far my impression is that:

1. Babylon.JS playground is mainly for prototyping and trying things to watch at runtime
2. For developing a more complicated project, whith more than one class in it, I should use an IDE, like visual studio and do the development locally and then check it on a localhost or web.

Please share your preferred workflow.

This question arises from a battle neck I had, when writing code in the playground.  
First, writing BABYLON. each time I need a class is redundant, and so I was looking for other workflow, and found this tutorial:

> **[Introduction To Creating Games | Babylon.js Documentation](https://doc.babylonjs.com/guidedLearning/createAGame)**
>
> Dive into some deeper game creation methods and techniques.

and I think this tutorial is somewhat close to what I need.

but, when looking at the logic, in the src file, I see it is TypeScript, and I know that Babylon.js also works with JavaScript so why use TS files? (I guess this is a more philosophical question).

Cheers

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [January 7, 2021, 10:06am UTC](https://forum.babylonjs.com/t/what-is-the-best-development-pipeline-for-developing-with-babylon-js/17259/2 "2021-01-07T10:06:51Z")

</div>

Yep, it’s all very subjective. Each of us here probably has a different way to deal with developing a large project.

I’ll start from the end -

> [@Eco\_Editor](#):
>
> why use TS files? (I guess this is a more philosophical question).

Oh, once you go TS you never go back :-).  
First - Babylon is written in TypeScript. It would be much harder doing everything in vanilla JS. Second - project is structured better (IMO) when you use typescript. A bit of type safety and a little less duck-typing will only do good for a large project. And third - why not? Typescript is a superset of javascript. It is not some random language or different syntax. it is practically the same. With Type Safety and an extra compilation step 🙂

About developing a larg(er) project - I agree with you. Though it is practically the same editor as vscode (monaco editor), the playground is not suitable for a large multi-classed project (thou you could put them all in a single file. Not recommended…). This would be my recommendation for a “getting started” project:

[RaananW/babylonjs-webpack-es6: Babylon.js basic scene with typescript, webpack, es6 modules, editorconfig, eslint, hot loading and more. Will even make coffee if you ask nicely. (github.com)](https://github.com/RaananW/babylonjs-webpack-es6)

---

<div class="post-metadata">

**Author:** ![to5ta](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/to5ta/32/50087_2.png) [@to5ta](https://forum.babylonjs.com/u/to5ta)\
**Post date:** [January 7, 2021, 1:38pm UTC](https://forum.babylonjs.com/t/what-is-the-best-development-pipeline-for-developing-with-babylon-js/17259/3 "2021-01-07T13:38:01Z")

</div>

Dont know if this adresses your question, but i have had good experiences using npm for package handling and webpack for bundling. (has nothing to do with babylonjs in particular)

Also github offers now to publish stuff using ‘github-pages’. Once set up properly, the app will be built and hosted automatically which is pretty handy.

During development, the app can be bundled and hosted/tested locally as well.

---

<div class="post-metadata">

**Author:** ![yamaciller](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yamaciller/32/21810_2.png) [@yamaciller](https://forum.babylonjs.com/u/yamaciller)\
**Post date:** [January 17, 2025, 4:21pm UTC](https://forum.babylonjs.com/t/what-is-the-best-development-pipeline-for-developing-with-babylon-js/17259/5 "2025-01-17T16:21:54Z")

</div>

We do our projects in JS and VSCode, running locally (using servez).  
Me as I am not a programmer, got into the flow and I can handle the projects, e.g. bringing in content and modifying it.  
I also wrote some smaller projects JS in PG just to get a basic understanding.  
I also use the graphical editors, I love Mr. Inspector!  
TS or JS? Never did TS.  
And … Our team has the best programmer in the world, hehe.!  
best.  
werner

---

<div class="post-metadata">

**Author:** ![rafaelj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rafaelj/32/36167_2.png) [@rafaelj](https://forum.babylonjs.com/u/rafaelj)\
**Post date:** [January 17, 2025, 6:41pm UTC](https://forum.babylonjs.com/t/what-is-the-best-development-pipeline-for-developing-with-babylon-js/17259/6 "2025-01-17T18:41:15Z")

</div>

My cents:

TypeScript isn’t just great for preventing runtime issues, but it also offers a solid foundation for implementing design patterns principles that I find crucial for creating scalable and maintainable code. VSCode + Typescript + Vite.js + Github is the fast way for me!. I came to this conclusion by applying an incremental and iterative development methodology to a sequence of more than 10 mini projects. The first of them was done on the playground and was part of an academic article that I published in a journal, the second was made in JS in a single file, the last ones are composed of more than 30 modules that form a reusable core for my specific dev case.

---

<div class="post-metadata">

**Author:** ![Lemcat](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/lemcat/32/44469_2.png) [@Lemcat](https://forum.babylonjs.com/u/Lemcat)\
**Post date:** [January 19, 2025, 12:01am UTC](https://forum.babylonjs.com/t/what-is-the-best-development-pipeline-for-developing-with-babylon-js/17259/7 "2025-01-19T00:01:54Z")

</div>

> [@rafaelj](#):
>
> Vite.js

Does Vite work with ES6 tree-shaking feature?

---

<div class="post-metadata">

**Author:** ![rafaelj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rafaelj/32/36167_2.png) [@rafaelj](https://forum.babylonjs.com/u/rafaelj)\
**Post date:** [January 19, 2025, 1:47am UTC](https://forum.babylonjs.com/t/what-is-the-best-development-pipeline-for-developing-with-babylon-js/17259/8 "2025-01-19T01:47:29Z")

</div>

It doesn’t work as expected, but Vite’s other features reduce and minify the final file size. Below is the result for a build of my Carnot Game:  
dist/assets/babylon-loaders-BwPuEUBH.js 1,374.08 kB │ gzip: 342.46 kB  
dist/assets/core-2p-xLsrR.js 4,304.58 kB │ gzip: 934.04 kB

The babylon.js core is less than 1 Mb (gzip), which is already a very small size in my opinion. To reduce it, I recommend doing a custom build of Babylon.js or researching more about vite.config.js settings.
