static site ... loading js files no mime type
See original GitHub issuehi, i’m getting this error when trying to host static site
the index.html is loading fine then when trying to load the js files (app) i get:
Loading module from “http://localhost:8000/modules/my-element.js” was blocked because of a disallowed MIME type (“”).
my assumption was oak would set the mime type based on extension. if im right is this a bug?
if im wrong is there any documentation that shows an example of the right way to set the the mime type for all served “.js” files?
thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:10
Top Results From Across the Web
Why are browsers refusing to load my .js files and complaining ...
This can cause HTML web pages to be downloaded instead of being rendered when they are served with a MIME type other than...
Read more >Properly configuring server MIME types - MDN Web Docs
How to check the MIME type of received content · Load the file and go to Tools > Page Info to get the...
Read more >Static files in ASP.NET Core | Microsoft Learn
Learn how to serve and secure static files and configure static file hosting middleware behaviors in an ASP.NET Core web app.
Read more >Refused to execute script | static resource | because its MIME ...
1. Deploy a static resoure including a js file with incorrect MIME type, for example text/plain · 2. Include file in site VF...
Read more >Why is “strict MIME type checking” blocking the static serving ...
We just finished a Vue frontend app for a Node.js application. Let's dispatch it to the server and make it public! Let's make...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
thanks, im just sending something now because i haven’t abandoned this, but i’ve been traveling. I’ll be trying to rework this this weekend.
here is the code im using:
here is the html file script loads