docusaurus: problems with main.css during npm run build since 1.0.12

Is this a bug report?

Yes

Have you read the Contributing Guidelines on issues?

yes

Environment

(Docusaurus version via npm outdated docusaurus or yarn outdated docusaurus, OS, Node, npm, yarn) Package Current Wanted Latest Location docusaurus 1.0.12 1.0.12 1.0.14

OS : Mac High Sierra Node : v8.4.0 npm : 5.6.0 yarn : 1.5.1

Steps to Reproduce

  1. Update to version 1.0.12 or beyond
  2. Run npm install followed by npm run build to generate the build
  3. Since this PR - https://github.com/facebook/Docusaurus/pull/569 - When I build and deploy my site I have css issues.
  4. When I deploy my site it does not display correctly, css is broken. In Chrome devtools console I see ```Resource interpreted as Stylesheet but transferred with MIME type test/plain: “https://www.www.www/doc-site/css/main.css

Expected Behavior

After update to 1.0.12 and later css would work correctly.

Actual Behavior

When I deploy my site it does not display correctly, css is broken. In Chrome devtools console I see ```Resource interpreted as Stylesheet but transferred with MIME type test/plain: “https://www.www.www/doc-site/css/main.css

Reproducible Demo

To demo this…

  1. init and build the demo site. Have a look at the generated css file.
  2. Deploy the build directory. You will see that css us broken.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (14 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks for the pointers @yangshun : I changed my nginx configuration (content-type header - text/css) and got it working again. I guess it’s handy to have a record of it here in case someone else comes up against the something similar.