Skip to content

Conversation

@timsuchanek
Copy link

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

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
@giuseppeg
Copy link
Owner

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

@comerc
Copy link

comerc commented May 27, 2017

My .postcssrc.js

module.exports = context => ({
  plugins: {
    'postcss-discard-comments': { removeAll: true },
    'postcss-inline-comment': {},
    'postcss-cssnext': {},
  },
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants