Skip to content

Multi-Threaded build in Vite #295

@Ruud-DRS

Description

@Ruud-DRS

When trying to load a custom made Multi-Threaded build in Vite in a worker, I'm getting the following error.
Refused to execute script from '<URL>' because its MIME type ('application/wasm') is not executable.

I'm loading it like this:

import mainJs from './customBuild.multi-threaded.no-exceptions.progress-indicator'
import mainWasm from './customBuild.multi-threaded.no-exceptions.progress-indicator.wasm?url'
import worker from './customBuild.multi-threaded.no-exceptions.progress-indicator.worker.js?worker'
mainJs({
  locateFile: () => mainWasm,
  worker: worker
}).then((o) => {
  oc = o
  console.timeEnd('Loading OpenCascade.js')
  postMessage({ messageType: 'INITIALIZED' })
})

Could anyone point me in the right direction?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions