"@babylonjs/havok" this package report a RuntimeError

1、import HavokPhysics from “https://cdn.babylonjs.com/havok/HavokPhysics_es.js
2、import HavokPhysics from “@babylonjs/havok”

When I import HavokPhysics with the 2nd sentence, the brower report a RuntimeError,
but when i replace it with the 1st sentence,the project run successfully, How can I use the 2nd way successfully?

my npm package version: “@babylonjs/havok”: “^1.3.10”
runtimeError:


image

Thanks!

I hope these lines may help

have seen from other topic,add this to vite.config.ts :
export default defineConfig({

optimizeDeps: {
exclude: [“@babylonjs/havok”],
},

}), it works for me

3 Likes