-
i'm running into this console error when trying to import compression via:
it's a sveltekit/vite app, and it runs i've got this installed:
i'm using yarn to install everything, maybe that's the problem? in case it's useful information, there is no problem with this import: and also, if i uncomment the problematic import (first sentence of this post) while the app is running, i get this modified console error:
for fun, i tried seeing if the issue is with any extension:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi! I'll probably need a simple way to reproduce the error to investigate. I went ahead and did a basic import { EXTMeshoptCompression } from '@gltf-transform/extensions';
console.log(EXTMeshoptCompression); ... but couldn't see any errors after running I'll venture a guess this has something to do with ESM vs CJS modules, and how SvelteKit compiles server-side and/or client-side code depending on how your configuration. If your application isn't ESM-only, or compiles to CJS for some reason, it might be worth testing with just ESM. glTF Transform does provide both ESM and CJS exports. |
Beta Was this translation helpful? Give feedback.
-
so i'm not sure exactly what fixed it, because this error caused me to basically upgrade everything, but my best guess is that it has something to do with using the vitePreProcess, which i think was unnecessary anyways because i already have svelte preprocess. once i got rid of this, it started loading.
but now that it's loading i'm sure i'll have more questions to get it working;) |
Beta Was this translation helpful? Give feedback.
so i'm not sure exactly what fixed it, because this error caused me to basically upgrade everything, but my best guess is that it has something to do with using the vitePreProcess, which i think was unnecessary anyways because i already have svelte preprocess. once i got rid of this, it started loading.
but now that it's loading i'm sure i'll have more questions to get it working;)