react-redux-starter-kit
react-redux-starter-kit copied to clipboard
performance - replace cssnano with postcss-inline-svg
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') })
]
I see the use of cssnano is more than processing svgs. it also does autoprefixer, comment stripping and magnification.