Skip to content

Web smoke server serves .mjs module workers as application/octet-stream #167

Description

@zcourts

Problem

fission test --target web --headless fails an otherwise built Fission Web app when it loads a module worker from a checked-in .mjs file:

Failed to load module script: Expected a JavaScript-or-Wasm module script but the server responded with a MIME type of "application/octet-stream".
Strict MIME type checking is enforced for module scripts per HTML spec.

The app's module worker is created with WorkerOptions { type: Module }. Its production server correctly serves .mjs as JavaScript, but the Web smoke server does not.

Expected behavior

The server used by fission run --target web and fission test --target web should serve .mjs as text/javascript (or another standards-compliant JavaScript MIME type), including nested worker modules. A smoke test should cover a module worker loaded from an .mjs asset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions