Import is not working
Describe the bug I would like to run react app using boa engine, first I tried to import a package like d3 and found there is an bug, may be the import feature is not ready yet.
To Reproduce
import d3Js from 'https://d3js.org/d3.v3.min.js';
Expected behavior expected to run without an error, and to see the wasm playground loaded through network the d3 package. but I received this error
Uncaught "SyntaxError": "unexpected token 'import', primary expression at line 1, col 1"
Build environment (please complete the following information):
- OS: Linux Manjaro
- Env: Playground
Yeah, the module system is a WIP. See https://github.com/boa-dev/boa/pull/2411 for updates.
This is technically solved by #2922, but the playground won't fetch modules from the web. I'm working on an example on how to asynchronously fetch modules using the new modules API, so we could easily integrate that into our wasm playground.