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
I'm interested in running JavaScript code that uses JS modules, including remote imports like import { memoize } from 'https://cdn.jsdelivr.net/npm/underscore/+esm';
but I get the error SyntaxError: Cannot use import statement outside a module
I can get this to work in STPyV8 by making an old-school bundle (or adapting the bundler made by @liran-funaro in issue #60 !)
However, V8 does support JavaScript modules, so I wonder if there's a way for STPyV8 to support this, how tricky it might be and if there is an interest in develop it?
I guess that this might be mostly just providing a switch, similar to the --input-type flag in nodejs.
Thanks!
Declan
The text was updated successfully, but these errors were encountered:
I am well aware of the issue and would like to fix it soon or later. But unfortunately I will not be able to do that soon due to lack of time. I will keep the issue open as a reminder for myself that I have to take care of that.
Hi,
I'm interested in running JavaScript code that uses JS modules, including remote imports like
import { memoize } from 'https://cdn.jsdelivr.net/npm/underscore/+esm';
but I get the error
SyntaxError: Cannot use import statement outside a module
I can get this to work in STPyV8 by making an old-school bundle (or adapting the bundler made by @liran-funaro in issue #60 !)
However, V8 does support JavaScript modules, so I wonder if there's a way for STPyV8 to support this, how tricky it might be and if there is an interest in develop it?
I guess that this might be mostly just providing a switch, similar to the --input-type flag in nodejs.
Thanks!
Declan
The text was updated successfully, but these errors were encountered: