Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to use production version as local app ( file:/// ) #1189

Closed
bublikOff opened this issue Dec 2, 2020 · 4 comments
Closed

Failed to use production version as local app ( file:/// ) #1189

bublikOff opened this issue Dec 2, 2020 · 4 comments

Comments

@bublikOff
Copy link

Failed to use production version as local app ( file:/// )
Got following error

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

@underfin
Copy link
Member

underfin commented Dec 3, 2020

Please provide a link to a repo that can reproduce the problem you ran into.

A reproduction is required unless you are absolutely sure that the the problem is obvious and the information you provided is enough for us to understand what the problem is. If a report has only vague description (e.g. just a generic error message) and has no reproduction, it will be closed immediately.

@underfin underfin closed this as completed Dec 3, 2020
@bublikOff
Copy link
Author

Please provide a link to a repo that can reproduce the problem you ran into.

A reproduction is required unless you are absolutely sure that the the problem is obvious and the information you provided is enough for us to understand what the problem is. If a report has only vague description (e.g. just a generic error message) and has no reproduction, it will be closed immediately.

I can not share source code. The main thing is that I can create prod version which works well from web hosting ( http(s):// )
But file:// scheme does not works at all

@underfin
Copy link
Member

underfin commented Dec 9, 2020

That caused by type=moudle is corss origin request, if you use file protocol open it, the script file will be blocked.

@xiaoxian521
Copy link

I can't open the same problem when I use http-server

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants