react-redux-starter-kit icon indicating copy to clipboard operation
react-redux-starter-kit copied to clipboard

performance - replace cssnano with postcss-inline-svg

Open pedroposada opened this issue 8 years ago • 1 comments

I believe cssnano in webpack.config.js is causing major build slowdown. After investigation on my side, I noticed that my build time went down to 3seconds from 17seconds by replacing cssnano with postcss-inline-svg as follows:

...
const PostCSSInlineSVG = require('postcss-inline-svg')
...
webpackConfig.postcss = [
  PostCSSInlineSVG({ path: project.paths.client('styles') })
]

pedroposada avatar Mar 18 '17 17:03 pedroposada

I see the use of cssnano is more than processing svgs. it also does autoprefixer, comment stripping and magnification.

6zz avatar Mar 22 '17 17:03 6zz