How to build and link babylon.js locally


I’m trying to get web xr going, but chrome seems to have done some changes, so BJS doesn’t want to work.

So as the nifty programmer I am i thought i could fork and npm link BJS into my app to be able to do some debugging and changes.

But I’m struggling with getting the build up and running.

I’m using the @preview release so I’m importing from @babylonjs/core

Should I use the preview branch or the master branch?
Should it suffice to run gulp run from ./Tools/Gulp/ to make it rebuild BJS?

How are you doing npm linked development against BJS?

// Leon

Here we are:

You should have everything you need here!

I was able to get it running.

Though I miss the typescript intellisense in localDev :slight_smile:

In Local dev add this at the top of your script :
/// <reference path="…/…/dist/preview release/babylon.d.ts"/>

As a huge plus, you can run gulp npmPackages-es6

This will create all the Babylon packages in a temp folder and properly link them for you. Then in your local app a simple npm link @babylonjs/… will make it target your local version

Thanks, I’ll give it a go :slight_smile: