Choose CSS Approach Wisely, Converting Later Can Be Painful
This is obvious.
I just moved a simple project with 8 components from CSS Modules, to Sass and it took some time. Clearly the more larger the project the more time it will take. Here are some of the steps:
- Convert all file name extensions and remove “.module” syntax (if applicable).
- import all of the “.scss” files into one file so they can be imported into global.scss, (or just import directly into global.scss)
- Go into each component’s JS file and removed the previously imported CSS file
- Add mixins file and add mixins import to every component that needs it