Just a basic vite/vue3 app in dev server, trying this code.
import * as WebIFC from '../node_modules/web-ifc/web-ifc-api.js'
... (in mounted hook) ...
// initialize the API
const ifcApi = new WebIFC.IfcAPI()
// initialize the library
await ifcApi.Init()
I get this console error related to mime types. Obviously the web-ifc code fails here (more console errors ensue)
wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'
I looked into it and I saw that the web-ifc-api.js is trying to do a fetch on web-ifc.wasm using the url`/web-ifc.wasm' which obviously won't give any result since the wasm file is inside the node_nodules/web-ifc folder.
Thoughts on what is wrong? Integrating web-ifc as an npm module into vue3/other framework apps is obviously a key use case for end users. Production build doesnt work either, same issue.
Version
0.0.54
What browsers are you seeing the problem on?
Chrome
Relevant log output
App.vue:30 wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
What happened?
Just a basic vite/vue3 app in dev server, trying this code.
I get this console error related to mime types. Obviously the web-ifc code fails here (more console errors ensue)
I looked into it and I saw that the web-ifc-api.js is trying to do a fetch on web-ifc.wasm using the url`/web-ifc.wasm' which obviously won't give any result since the wasm file is inside the node_nodules/web-ifc folder.
Thoughts on what is wrong? Integrating web-ifc as an npm module into vue3/other framework apps is obviously a key use case for end users. Production build doesnt work either, same issue.
Version
0.0.54
What browsers are you seeing the problem on?
Chrome
Relevant log output
Anything else?