Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove postcss comments #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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