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

Use PostCSS loader if a PostCSS config file is present #696

Merged
merged 4 commits into from
Jun 17, 2020

Conversation

bjackson
Copy link
Contributor

This will allow users to use PostCSS without modifying their webpack configs.

To enable the postcss-loader, add a postcss.config.js file to web/config.

As an example, you can use this config file to enable autoprefixer. (Install yarn workspace web add autoprefixer to use this).

module.exports = {
    plugins: {
        'autoprefixer': {},
    }
}

@peterp peterp self-assigned this Jun 15, 2020
@peterp peterp added this to the next release milestone Jun 17, 2020
@peterp peterp merged commit 8cceeb0 into redwoodjs:master Jun 17, 2020
@thedavidprice
Copy link
Contributor

Thanks for this @bjackson!

Question: does it look like we need to update this doc based on the changes in this PR?
https://redwoodjs.com/docs/webpack-configuration#supported-extensions-and-loaders

If so, please loop in @jtoar and me and we'll make sure to update it.

@bjackson
Copy link
Contributor Author

@thedavidprice Yes, we should update the docs to include adding a config to web/config/postcss.config.js and installing postcss-loader, instead of altering the postcss-loader options.

@jtoar
Copy link
Contributor

jtoar commented Jun 28, 2020

Thanks for this @bjackson, doing docs on this now in https://github.com/redwoodjs/redwoodjs.com/pull/219.

@jtoar jtoar mentioned this pull request Jul 13, 2020
3 tasks
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.

4 participants