-
-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.2.0] Cannot import framework-agnostic version #360
Comments
I believe the problem might be that |
I don't think Probably unrelated to the issue, but |
That's great, though does not change much. It looks like the |
I think esbuild resolves require() calls at bundle time, which means that conditional requires() on flags that in the browser would always be true will actually get resolved eagerly :( |
I'm not sure where does the |
@Squareys I think "tensorflow" may be the one causing the problem, although I suspect the actual bug may lie in either Esbuild or Vite (which passes commands to Esbuild). Have you tried |
@jmschrack Thank you for helping out here! Highly appreciated 🙏 With your suggestion import {Controller} from 'mind-ar/src/image-target/controller.js' I'm running into trouble with the worker that is imported transitively:
Is that possibly a special rollup.js feature to be able to import workers like that? * Edit: So yes, indeed, I'd need the esbuild-plugin-inline-worker, but we're currently running Thank you very much! |
I figured it out with the suggestion of @jmschrack, here's our solution:
Closing--highly grateful for your help! |
Glad I could help! @hiukim I think it might be useful to note in the documentation about this setup with esbuild?
|
Yes, totally! I'll put that in. thx |
Hi @hiukim !
Trying again to import 1.2.0 with the following code:
This is the error I get:
I'm using
esbuild
to bundle for the browser. Any help is appreciated! 🙏Best,
Jonathan
The text was updated successfully, but these errors were encountered: