Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Support MIME Types -- Necessary for even basic static javascript pages that use IMPORT #5

Open
pha3z opened this issue Aug 17, 2020 · 2 comments

Comments

@pha3z
Copy link

pha3z commented Aug 17, 2020

I am building a static site that uses Javascript to talk a remote REST API. I believe this is very popular web design because it lets you serve dynamic content from a static site.

Unfortunately, this HTML line:
<script src="js/editor.js?v=1.0" type="module"></script>

Throws this error in Chromium:

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

Would it be significant effort to add some default MIME types to include in return headers?

@pha3z
Copy link
Author

pha3z commented Aug 17, 2020

It would be very nice if the EXE just read a .config file and the MIME list can be put in that file. That way there's a default, but its user configurable and extendable.

@ethanpil
Copy link
Owner

ethanpil commented Nov 4, 2020

Great idea. I will look into it. Thanks for the suggestion. If you want to submit a PR, I will be glad to take that instead ... :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants