react-flag-icon-css
react-flag-icon-css copied to clipboard
Compatibility with create-react-app 2.0 built-in CSS modules
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.