Open
Description
Describe your feature request here.
Are there any plans to support ES6 modules in addition to CommonJS?
Example JS:
function hello(items) {
console.log("hello world");
}
export {hello};
Trying to use this with PythonMonkey currently throws an error:
return createRequire(filename)(moduleIdentifier)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pythonmonkey.SpiderMonkeyError: Error in file [python code], on line 0:
Error: Python str: Error in file evaluate, on line 5:
export default hello;
^
SyntaxError: export declarations may only appear at top level of a module
Code example
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog