Closed
Description
It would be nice to be able modify or add PostCss plugins.
If there was a css config file that could be modified that sits in the src directory it could be required in the Webpack config and allow additional functionality (without ejecting) but still keep to the goals of this project.
Roughly this:
Modified Webpack config
var path = require('path');
var cssConfig = require('../src/css.config')
var webpack = require('webpack');
...
},
postcss: function() {
return cssConfig;
},
plugins: [
new HtmlWebpackPlugin({
By default autoprefixer would be the only plugin in the file after running (create-react-app my-app).
Default css.config.js
var autoprefixer = require('autoprefixer')
module.exports = [autoprefixer]
User could add plugins as desired:
customized css.config.js
var autoprefixer = require('autoprefixer')
var postcssnested = require('postcss-nested')
module.exports = [postcssnested, autoprefixer]
I think a setup something like this would allow users to use SASS, LESS etc...
Metadata
Metadata
Assignees
Labels
No labels