Static GitHub Issues

[2579] wasm files not served as application/wasm in nuxt dev

prev: Errors on formatting conventions
next: Can we add a webpack plugin inside a nuxt module?

Using 1.1.0, if I place .wasm files in static/, they're served up as application/octet-stream. This breaks any attempt to load them into my app, which expects them to be application/wasm.

I imagine this isn't a Nuxt issue, but something in a dependency. It looks like webpack-dev-middleware should support wasm as of a fairly recent version:

https://github.com/webpack/webpack-dev-middleware/issues/229

There has been a new release published since the last comment on that issue, it is getting pulled in, and I see wasm strings in the mime package. So things seem fine, but maybe static files are served differently.

As an aside, I don't know if there is a better support channel than issues, and I feel odd opening issues for basic questions. I'm trying to use spatiasql which distributes a worker and wasm files in its NPM package. Is there a way to have Nuxt integrate the context of, say, node_modules/spatiasql/dist/wasm into the app such that its contents are served at /wasm or something? At the moment I'm manually copying these files into static/, but far better would be if I could serve up the module directly while developing, and integrate its dist/ directory into the output of nuxt build. Thanks.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2245">#c2245</a>)</em></sub></div>