GridMaterial - Cannot read property 'Effect' of undefined on Sveltekit

Cannot read property 'Effect' of undefined

TypeError: Cannot read property 'Effect' of undefined
    at Module../grid/grid.fragment.ts (/src/babylonjs.gridMaterial.js:423:56)
    at __webpack_require__ (/src/babylonjs.gridMaterial.js:31:30)
    at Module../grid/gridMaterial.ts (/src/babylonjs.gridMaterial.js:467:72)
    at __webpack_require__ (/src/babylonjs.gridMaterial.js:31:30)
    at Module../grid/index.ts (/src/babylonjs.gridMaterial.js:731:71)
    at __webpack_require__ (/src/babylonjs.gridMaterial.js:31:30)
    at Module.eval (/src/babylonjs.gridMaterial.js:748:115)
    at Module../legacy/legacy-grid.ts (/src/babylonjs.gridMaterial.js:764:30)
    at __webpack_require__ (/src/babylonjs.gridMaterial.js:31:30)
    at /src/babylonjs.gridMaterial.js:95:18

Anyone knows how to fix it? I copied gridmaterial from github and iā€™m testing with sveltekit

I have no idea what is Sveltekit unfortunately ;(

Can you repro that issue in the playground?

Hello,

There is no way to reproduce this on playground i think. The only way i know is to install the new svelte repo + babylonjs + gridMaterial file.

Anyway, if you do that, this is the repo of sveltekit

I made a repo, so you can check it out:

The only problem is on importing GridMaterial.

Uncaught (in promise) TypeError: Cannot read property 'GridMaterial' of undefined
    at createScene (:3000/src/components/scene0.js:47)

You can check the repo here: