Skip to content

postcss option is not working after v14.0.2 #1160

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

Closed
weizhenye opened this issue Feb 12, 2018 · 5 comments
Closed

postcss option is not working after v14.0.2 #1160

weizhenye opened this issue Feb 12, 2018 · 5 comments

Comments

@weizhenye
Copy link

Version

14.1.1

Reproduction link

https://gist.github.com/weizhenye/2288bcf2854f4ae38f5ba604548fabd3

Steps to reproduce

  1. Download this gist ZIP
  2. npm i
  3. npm i vue-loader@14.0.1
  4. npm run build
  5. Open dist/style.css
  6. npm i vue-loader@14.0.2
  7. npm run build
  8. Open dist/style.css

What is expected?

The nesting syntax should be compiled by PostCSS

What is actually happening?

postcss: [cssnext()] in webpack.config.js is not working in 14.0.2 (and also v14.1.1)


It might be caused by this commit

@blake-newman
Copy link
Member

I have found this to be an issue with cssnext, for a while. At my workplace we have a React app also with same issue. Havn't explored to deeply, however you can resolve this simply adding https://github.com/postcss/postcss-nested, this plugin seems to work much better than that provided by the cssnext tooling.

@weizhenye
Copy link
Author

@blake-newman
No, it's not about cssnext, it is an issue with vue-loader.
Any other conditions are same, the only difference is update vue-loader from v14.0.1 to v14.0.2, and then all plugins in postcss option is not working.
I just install postcss-nested and replace config with postcss: [require('postcss-nested')()], it still not work.
You can reproduce it with above steps.

@blake-newman blake-newman reopened this Feb 13, 2018
@jarrodldavis
Copy link

jarrodldavis commented Feb 19, 2018

I’m having the same issue, even when using postcss.config.js instead of the inline config in webpack. Downgrading to 14.0.1 also fixes the problem for me.

Edit: Hmm I guess something was off because the external config works for me now.

@sscharfenberg
Copy link

sscharfenberg commented Mar 4, 2018

Same problem here.
Setup is similar, instead of cssnext I use postcss-flexbugs-fixes, autoprefixer and cssnano - none of them are applied with vue-loader@14.1.1.

@yyx990803
Copy link
Member

Should be fixed in 905b813

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

No branches or pull requests

5 participants