You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it seems imports in general are supported in Javet, but it is not clear whether dynamic imports are as well or not. May I ask please if there is a minimal example using dynamic imports? More specifically, I want to evaluate the following expression:
, which takes a few seconds to complete and eventually prints a JSON object to the console. However, so far I only get the "not supported" error message.
Regarding normal import, running import { pipeline } from 'https://esm.sh/@xenova/[email protected]' returns Cannot find package 'https://esm.sh/@xenova/[email protected]'. Is there something I am missing?
Thanks
The text was updated successfully, but these errors were encountered:
Both Node.js and V8 modes don't have the built-in support to importing from arbitrary resource because:
V8 is a pure script engine that doesn't know file system or network.
Javet is designed to be secure by default. Allowing the guest scripts to access storage or network is not secure at all.
I suggest you write your own module resolver to empower the ESM by fetching the resource in the module resolution. Please refer to this doc for details.
Hello,
it seems imports in general are supported in Javet, but it is not clear whether dynamic imports are as well or not. May I ask please if there is a minimal example using dynamic imports? More specifically, I want to evaluate the following expression:
, which takes a few seconds to complete and eventually prints a JSON object to the console. However, so far I only get the "not supported" error message.
Regarding normal import, running
import { pipeline } from 'https://esm.sh/@xenova/[email protected]'
returnsCannot find package 'https://esm.sh/@xenova/[email protected]'
. Is there something I am missing?Thanks
The text was updated successfully, but these errors were encountered: