Dfx 0.7.0-beta.2 does not allow ES modules

I can confirm that as of v0.7.0 this issue has been fixed: Dfx 0.7.0-beta.2 does not allow ES modules

But the problem described here: Dfx 0.7.0-beta.2 does not allow ES modules - #2 by lastmjs has not been fixed

Only a top-level ES module will load, none of its dependencies will load. I’m pretty sure this is because the Referer header on the request to get ES module dependencies does not have the canister id in it. Without ES modules being able to import dependencies locally, it’s very difficult to test ES modules locally.

Actually, this thread shows a possible solution as long as you use Chrome locally: How does replica know which canister to serve from - #4 by lastmjs

2 Likes