minify-css.macro
npm i minify-css.macro
A babel plugin for removing the whitespace from a CSS-generating tagged template literal while preserving function/variable instances.
Prerequisites
Using this plugin requires that you are also using babel-plugin-macros
(included in create-react-app
by default)
Usage
// [Input] const getStyle = css` text-align: center; font: ;` // [Output] const getStyle = 'text-align:center;font:' + themefontprimary + ';'
LICENSE
MIT