This repository was archived by the owner on Oct 19, 2022. It is now read-only.
forked from facebook/create-react-app
-
Notifications
You must be signed in to change notification settings - Fork 6
Not possible to import external stylesheets #10
Comments
Seems fine to me. Would love to get it released soon. 😄 |
Made a PR, hopefully it's all right |
Actually, one more thing to look at is external in-CSS imports. For instance,
This should work as well but I'm not sure if my proposed solution provides that. |
I believe this should work: :global {
@import '~react-dates/css/variables.scss';
} |
Should it work out of the box? With the following code
Bootstrap is installed of course. |
I can see that it can't handle nested directories. |
Ok, the problem was |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is this a bug report?
No.
Currently, there is no way, as far as I know, to add an external stylesheet to the app. Notably, importing stylesheets in JS will not work because of CSS Modules. This makes it impossible to use certain 3rd party components.
One solution is to add a separate config for CSS/SCSS files imported from
node_modules
. I made a proof of concept commit here that seems to work when I make those changes locally. I'm not sure if I'm not omitting anything in the config, though. Also, I haven't made any changes to the production config. I can make a proper PR if the changes here look good to others.The text was updated successfully, but these errors were encountered: