React-styleguidist: Escape hatch to just add <link> tag to load a css file

Created on 19 Dec 2017  ·  4Comments  ·  Source: styleguidist/react-styleguidist

I searched all over, but came up empty.

Is there an escape hatch to tell react-styleguidist to "just add tags for some css files I specify?" I've already once in my life attempted to get all of webpack's loaders just right so bootstrap would load, but wound up quitting, and opting for a plain and simple tag in my html file.

Does such an option exist here?

question

Most helpful comment

For the benefit of anyone else finding this issue, the solution is to just use the template option, and provide your own html file with whatever script or link tags you want.

It seems styleguidis expects there to be a div with an id of app, so be sure to include that. ie

<html>
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>
        <div id="app"></div>
    </body>
</html>

All 4 comments

For the benefit of anyone else finding this issue, the solution is to just use the template option, and provide your own html file with whatever script or link tags you want.

It seems styleguidis expects there to be a div with an id of app, so be sure to include that. ie

<html>
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>
        <div id="app"></div>
    </body>
</html>

Would be nice to add an example here: https://react-styleguidist.js.org/docs/cookbook.html ;-)

I'll see what I can do :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gscottolson picture gscottolson  ·  3Comments

sapegin picture sapegin  ·  3Comments

stcherenkov picture stcherenkov  ·  3Comments

mheathcote1977 picture mheathcote1977  ·  3Comments

vslinko picture vslinko  ·  3Comments