I have started playing with Babylon.js, and I find it an enjoyable framework to work with. I was not able to find a basic tutorial on setting up a local project without webpack. The first tutorial I’ve written in my life So, please, don’t judge.
Great article - I saw the legacy import, but saw you showed how to fix it, which was cool
I didn’t write a tutorial, but also was looking at ways not using webpack as well and made a community template for snowpack for babylonjs. Most of my projects use rollup and github actions lately.
Deploy to GH pages also very useful. One thing that I didn’t see was typically you need a secret to deploy with a token, but I didn’t see how you connected those. Maybe your deploy action gets it from context somehow? I’ll check that repo out.
Also, I looked for the static deploy docs and see that base is often configured instead of passed in. I like how CRA can set it from package.json, but vite seems less opinionated that way.
Great article, very simple and logical!
I tested the code from GitHub - sotovviktor/babylonjs-project npm run dev works with no problems (without import.meta.env.BASE_URL) npm run serve shows the ground but no model npm run build doesn’t show anything
Seems there should be defined base URL somehow. Could you kindly put a light on this problem?
Now npm run serve works at port 5000 with no problems.
Still for npm run build seems it adds not needed slash before URL in index.html and in .js files.
(I mean here not deploying to GH pages but just usual dist).
If I correct those slashes in index.html, ground is shown but no Dude, no shadows