Migrating to Stylify

If you are about to integrate the Stylify into an existing project you should start by rewriting small pieces of your application to minimize the integration errors and carefully remove all unused rewritten pieces of CSS.

Don't worry about increasing the CSS size in your application by switching to Stylify. Stylify doesn't ship with any predefined CSS and it will generate only that CSS that matches the selectors you use. So if you write nothing, nothing will be generated.

Stylify can also generate CSS for each bundle separately so you can create small chunks of CSS and load them only when needed.

The recommended steps you should follow are the following:

  1. Pick a small (or non critical) piece of your application.
  2. Create a bundle for that piece of application using @stylify/bundler.
  3. Rewrite the CSS of that selected part.
  4. Import the bundle CSS and remove the unused rewritten CSS.
  5. If all the previous steps are done, mangle selectors during a production build and repeat the process until everything is rewritten.