Open timsuchanek opened 7 years ago
Maybe we should make this behavior configurable. We could pass postcss options to the processor from the babel plugin https://github.com/giuseppeg/styled-jsx-postcss/blob/master/src/babel.js#L91 https://babeljs.io/docs/plugins/#plugin-preset-options
My .postcssrc.js
module.exports = context => ({
plugins: {
'postcss-discard-comments': { removeAll: true },
'postcss-inline-comment': {},
'postcss-cssnext': {},
},
})
When using plugins like
postcss-next
,postcss-inherit
it occurs to me, that the sourcemap is added, even in production builds. This removes the comments completely. It reduced our build size from 9.8M to 5.2M