.wasm MIME type issue?

I know that in version 4.16.3 you updated mime-types to version 2.1.18 (via an update to accepts),
but it seems like Express still can’t serve.wasm files.

If I do:

const express = require('express')
const app = express()
app.listen(8000, () => console.log('Serving at http://localhost:8000!'))

and have a .wasm file in the docs folder I’m serving I get an error:

Incorrect response MIME type. Expected 'application/wasm'.

Adding express.static.mime.types['wasm'] = 'application/wasm' fixes the issue for now, just wondering when this will be fixed in the project by default?

Author: Fantashit

1 thought on “.wasm MIME type issue?

Comments are closed.