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

Strict MIME type checking is enforced for module scripts per HTML spec. #28

Open
gilescope opened this issue Jul 29, 2020 · 6 comments
Open
Labels
docs Missing examples, tutorials, guides, typos, code comments ..

Comments

@gilescope
Copy link

On mac when cloning and then cargo make serve I get the following error on Chrome and Firefox:

The server responded with a non-JavaScript MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.

@gilescope
Copy link
Author

Maybe cargo make serve isn't enough and I am missing a step?

@gilescope
Copy link
Author

You get this error if 'cargo make watch' hasn't been successful or hasn't been run.

@MartinKavik
Copy link
Member

You get this error if 'cargo make watch' hasn't been successful or hasn't been run.

I'll reopen this issue so I don't forget to add it into documentation, thanks for the issue!

@MartinKavik MartinKavik reopened this Aug 8, 2020
@MartinKavik MartinKavik added the docs Missing examples, tutorials, guides, typos, code comments .. label Aug 8, 2020
@najamelan
Copy link

This is confusing for people that have never used seed and microserver before.

I think ideally cargo make serve should trigger a build on its own (cargo make should make this easy). Watching is something different all together, and when you are just wanting to check out seed, you don't necessarily count on changing files, so it's confusing that watch is required, as serve does generate some output making it look like it's building the project (actually it's just building microserver).

Another option is to use the --no-spa flag on microserver, since you are not counting on redirecting pkg/package.js to index.html, which would at least give a better error message.

@MartinKavik
Copy link
Member

@najamelan

I think ideally cargo make serve should trigger a build on its own

It's a little bit more complicated - what build? Debug or Release? Should we add serve_release and watch_release? Then you can be confused when you run serve_release and then accidentally watch_debug - you would be serving the debug build although you've run serve_release. So we've decided to make it as simple as possible, especially for developers who already write their Seed app.

Another option is to use the --no-spa flag on microserver

It would break routing/redirecting from non-root paths, I don't think we can do that.


So.. I don't plan to update this quickstart by myself in the near future because I'll focus on Seeder, however I'm open to discussing better DX / API / tasks and then merge PRs.
Thanks for the comment!

@najamelan
Copy link

najamelan commented Aug 16, 2020

Debug or Release?

I would think the same one you run on cargo make watch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Missing examples, tutorials, guides, typos, code comments ..
Projects
None yet
Development

No branches or pull requests

3 participants