Skip to content
This repository has been archived by the owner on May 29, 2022. It is now read-only.

Feature Request: Add autoprefixer as an option #2

Open
delebash opened this issue Jul 8, 2016 · 8 comments
Open

Feature Request: Add autoprefixer as an option #2

delebash opened this issue Jul 8, 2016 · 8 comments

Comments

@delebash
Copy link

delebash commented Jul 8, 2016

It would be nice to have enableAutoprefixer: true/false to the config-sass options since autoprefixer is a common task and add autoprefixer to config-css as well either way an option to have end resulting css autoprefixed.

Thanks

@niieani
Copy link
Contributor

niieani commented Jul 9, 2016

Good idea! Would you be interested in making a PR for this?

1 similar comment
@niieani
Copy link
Contributor

niieani commented Jul 9, 2016

Good idea! Would you be interested in making a PR for this?

@delebash
Copy link
Author

delebash commented Jul 13, 2016

I have done this and can add this to the config-css as well, but I was thinking it might be better to just create an easy-webpack/config-postcss with params like autoPrefixer:boolean and other preset configs that might be useful. Additionally having an option to pass in your own plugins into a postcssPlugins: array

Although, I am not sure how making a separate config-postccs would work with the current config-css
config-sass.

How would you set up a test for config-postcss? Normally postcss is attached to a test for css or sass files like so

 test:   /\.css$/,
                loader: "style-loader!css-loader!postcss-loader"

Is it possible to run a loader like loader: 'postcss-loader'after both config-sass and config-css have run while not having an actual test for it. Some way to just call a loader?

The modified config-sass is currently setup with autoPrefixer:boolean and postcssPlugins: array of postcss plugins

I can put in a pull request for this unless you think having a separate config-postcss might work

Edit: Just thought that maybe we can just test for css twice since loader order matters with webpack ,just having css-loader below postcss-loader but both with a test for css

@niieani
Copy link
Contributor

niieani commented Jul 13, 2016

We'll think about how best to add the ability to extend CSS loaders. Thanks for researching the topic!

@m-andrew-albright
Copy link

Has there been any development or defined best-practices regarding how to use postcss/postcss-loader in an easy-webpack configuration?

@niieani
Copy link
Contributor

niieani commented Sep 5, 2016

@m-andrew-albright You can simply add the loader into the additionalLoaders.

@mikeesouth
Copy link

This issue isn't closed even though it seems like resolved. I do however have problems getting autoprefixer to work with webpack2. I know an aurelia update to the webpack support is coming up but do anyone have a solution to use css + sass + autoprefixer today?

I have an open issue for this on the @easy-webpack/config-css repo: easy-webpack/config-css#19

@niieani
Copy link
Contributor

niieani commented Jan 8, 2017

I've kept the issue open since we want to have a simple parameter option for activating an autoprefixer. I'll take a look at your issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants