threlte / three-inspect

An inspector and debugger for Three.js
MIT License
28 stars 1 forks source link

Vanilla JS - failed to resolve @threlte/core #15

Open jmschrack opened 4 months ago

jmschrack commented 4 months ago

I tried adding three-inspect to an existing project I have that is written using vanilla js in Vite and ThreeJS Unfortunately, I run into this error when I try to run dev.

[ERROR] Failed to resolve entry for package "@threlte/core". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." specifier in "@threlte/core" package [plugin vite:dep-pre-bundle]

node_modules/three-inspect/dist/internal/context.js:1:32: 1 │ import { currentWritable } from '@threlte/core';

michealparks commented 3 weeks ago

Thanks for reporting! The vanilla export has been fixed in 0.5.0. Check out the docs for setup (which has changed) or this stackblitz example: https://stackblitz.com/edit/vitejs-vite-pxodhz?file=src%2Fmain.ts. Let me know if that fixes things for you.