I am learning server rendering react currently. And I try to convert a product-landing -page Demo to react with express, babel, Webpack.
There are two problems currently after building and running npm start:
- index.css cannot link to index.html, the error in console is :The resource from “http://localhost:3100/index.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
- the Logo image in /img cannot load to the index.html.
My folder structure is:
...
-client/App.jsx
/client.jsx
-dist/client.js
-img(for images)
-public/index.html
/index.css
-server/index.js
...
The error in console is : The resource from “http://localhost:3100/index.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
My entire code in github: https://github.com/Jo-Zh/Product-Landing-Page.
Can anyone give me some hint? Thanks!