Include Autoprefixer
See original GitHub issueI would like to know if we should include the setup needed to include autoprefixer into the webpack setup.
I found this a bit confusing to figure out how to implement into it given that autoprefixer recommends the use of postcss.
thus my loaders were
if(env === productionEnvironment){
loaders.push({
test: /(\.css|\.scss)$/,
include: path.join(__dirname, 'src'),
loader: ExtractTextPlugin.extract("css?sourceMap!postcss!sass?sourceMap")
});
}else{
loaders.push({
test: /(\.css|\.scss)$/,
include: path.join(__dirname, 'src'),
loaders: ['style', 'css?sourceMap', 'postcss', 'sass?sourceMap']
});
}
and i also had to add to my config export
postcss: ()=> [autoprefixer]
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:9 (3 by maintainers)
Top Results From Across the Web
postcss/autoprefixer: Parse CSS and add vendor prefixes to ...
Autoprefixer Cult Of Martians · PostCSS plugin to parse CSS and add vendor prefixes to CSS rules using values from Can I Use....
Read more >autoprefixer - npm
Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website. Latest version: 10.4.13, last published: 2...
Read more >How to Add CSS Vendor Prefixes Automatically - Medium
The autoprefixer is a PostCSS plugin to parse CSS and add vendor prefixes to CSS rules using values from Can I Use.
Read more >Autoprefixer: A Postprocessor for Dealing with Vendor ...
Autoprefixer parses CSS files and adds vendor prefixes to CSS rules ... So after Autoprefixer, CSS will contain only actual vendor prefixes.
Read more >Use Autoprefixer for browser compliant code - OpenClassrooms
“Autoprefixer” is a plugin that can save you from the monotony of -webkit- and -moz- . It does exactly what it sounds like:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Okay, enough people have asked, so I’m caving and adding it. 😃
PostCSS is now part of the story. For now, only autoprefixer is included, but open to a PR that adds linting.
Here’s the commit: https://github.com/coryhouse/react-slingshot/commit/582f0111a8bee0751c6afbca26ac215367ee7cb8
Pull request added #45