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
- Update to version 1.0.12 or beyond
- Run
npm installfollowed bynpm run buildto generate the build - Since this PR - https://github.com/facebook/Docusaurus/pull/569 - When I build and deploy my site I have css issues.
- 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…
- init and build the demo site. Have a look at the generated css file.
- 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)
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.
Done @JoelMarcey , hopefully it’s ok - https://github.com/facebook/Docusaurus/pull/611
cc @yangshun