Closed ghost closed 7 years ago
const env = process.env.NODE_ENV
const plugins = [
require('postcss-calc')(),
require('autoprefixer')(...options),
env === 'production' ? require('postcss-normalize-whitespace')() : false
].filter(Boolean)
Great! I knew what it is possible! Thank you for the quick answer!
Thank you for the amazing tool!
I learned the list of cssnano optimizations: it includes
autoprefixer
(not default),cssnano-util-raw-cache
, etc.Next I look the your documentation: it has the following example:
Well, although it has been said that
autoprefixer
is one ofcssnano
optimizations, in the above example it was defined separately. However, I can't to understand from the above example, how to set the desired optimizations from the first link (list of cssnano optimizations).E. g. I want to use
postcss-calc
in both development and production builds, however I need to usepostcss-normalize-whitespace
only in production build. How I should to complete the below code?