Dfx 0.7.0-beta.2 does not allow ES modules

The problem is even more involved.

I’ve created a simple http proxy server on my local machine to try and get around the problem described above. If I explicitly set the Content-Type response header to application/json, then I can get a top level ES module to load. But the dependencies of that top level module will not load, the replica seems to always return 500 errors.

As I’ve dug into it, it looks like the http requests made from an ES module do not carry any information about the canisterId from the original URL. Other requests have the canisterId in the Referrer request header, but the referrer of in the http requests from an ES module does not have the canisterId in it. Could that be the problem? I’m not sure how the replica will be able to understand which canister it is servers assets for without providing the canisterId somehow.

1 Like