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

Question: How to extend config and add post-css plugins? #74

Closed
fredrik-sogaard opened this issue Jan 28, 2018 · 0 comments
Closed

Question: How to extend config and add post-css plugins? #74

fredrik-sogaard opened this issue Jan 28, 2018 · 0 comments

Comments

@fredrik-sogaard
Copy link
Contributor

fredrik-sogaard commented Jan 28, 2018

How would I go about extending the config and adding a few simple postcss plugins? I've got it working by modifying createConfig.js directly like so:

{
  loader: require.resolve('postcss-loader'),
  options: {
    ident: 'postcss', // https://webpack.js.org/guides/migrating/#complex-options
    plugins: () => [
      require('postcss-easy-import'),
      require('postcss-flexbugs-fixes'),
      require('precss'),
      autoprefixer({
        browsers: [
          '>1%',
          'last 4 versions',
          'Firefox ESR',
          'not ie < 9', // React doesn't support IE8 anyway
        ],
        flexbox: 'no-2009',
      }),
    ],
  },
}

Is there a simple way of doing this in after.config.js?

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

No branches or pull requests

2 participants