Skip to content

[feat. req.] mime type configuration #230

@robbiemu

Description

@robbiemu

It would be great if there was a configuration option like:

mimetypes: [ {'regex-for-filename/extension': 'mime-type'}...]

I'd like to use this with an ES6 modules project. The error I am getting is:

:8080/ui/:1 Failed to load module script: The server responded with a non-JavaScript MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.

Browser is of course expecting text/javascript for javascript files.

This is imported from main.js, which is loaded properly from the script tag: <script type=module src="./main.js"></script>

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