Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with create-react-app 2.0 built-in CSS modules #98

Open
matteocng opened this issue Jul 16, 2018 · 0 comments
Open

Compatibility with create-react-app 2.0 built-in CSS modules #98

matteocng opened this issue Jul 16, 2018 · 0 comments

Comments

@matteocng
Copy link
Owner

matteocng commented Jul 16, 2018

create-react-app 2.0, currently in alpha, supports CSS modules out of the box without ejecting, they just have to end with .module.css.

Since we are currently requiring .css files (SEE: ./src/styles), we know that this module will still not work, in CSS Modules mode (when cssModules: true is passed to FlagIconFactory), withcreate-react-app 2.0 ... unless the user ejected and modified the configuration of the CSS loaders.

We should add a section to the documentation explaining how to do that - tweaking the regex of the CSS modules loaders, after ejecting, to load .css files inside flag-icon-css and react-flag-icon-css as CSS modules, even though they don't have the correct extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant