Saturday 30 June 2018

How to define MIME types with Create-React-App's node server?

I'm trying to deal with this WebAssembly note: "Note: To run with instantiateStreaming and compileStreaming, you need your webserver to serve .wasm file with application/wasm MIME type. The https crate can be used to serve files from localhost, and includes the application/wasm MIME type out of the box."

Indeed, I get a MIME error in the JS console. A Google search revealed no way to configure this. Mozilla recommends instantiateStreaming over the depricated WebAssembly.instantiate. The latter doesn't work for me either, if using stdweb or bindgen: It wants a second argument which I'm not sure how to provide.



from How to define MIME types with Create-React-App's node server?

1 comment:

  1. Hey, have found a solution to the issue you posted? I have the similar issue.
    Please share if you have a solution.

    G.

    ReplyDelete