Including External CSS
See original GitHub issueI’m having an issue and wondering if there’s a option in the configuration to address it. My component styles are maintained outside of the components and not directly imported by them (dir structure example below). For deploys, the styles are compiled separately and included in the document head.
My issue is: I can’t seem to instruct react-styleguidist
to include them.
I’ve tried specifying a custom template that points to the built styles; however, all the paths I’ve tried return a 404 (can’t get the path right). If I can get that correct it would be a workable solution. I would lose file watching and reloading though.
Are there any other approaches I should look at?
src
|- components
|- styles
|- index.css
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
How to add CSS - W3Schools
External CSS. With an external style sheet, you can change the look of an entire website by changing just one file! Each HTML...
Read more >External CSS Stylesheets – How to Link CSS to HTML and ...
It is considered a best practice to have your CSS stylesheets in an external file. So how can you link that CSS to...
Read more >How to Include CSS in HTML Pages - Tutorial Republic
Including CSS in HTML Documents ; Inline styles — Using the style attribute in the HTML start tag. ; Embedded styles — Using...
Read more >Attaching CSS to your document
The best method for attaching your CSS style sheets is to use external styles. With this method, you will write all your CSS...
Read more >How to Link CSS to HTML Files in Web Development - Hostinger
How to Link CSS to HTML File Externally · rel – defines the relationship between the linked document and the current one. ·...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Have you tried this solution?
Is there a way to import CSS directly into the index page without using a
require
as this doesn’t seem to be compatible with the webpack config used by create-react-app?