Vue-loader: Completely ignoring .postcssrc.js

Created on 4 Sep 2017  路  7Comments  路  Source: vuejs/vue-loader

Version

13.0.4

Reproduction link

https://github.com/warent/vue-loader-bug1

Steps to reproduce

  1. npm install
  2. npm run build
  3. npm start

What is expected?

Should throw an error because .postcssrc.js has bogus data

What is actually happening?

Everything runs fine

improvement

Most helpful comment

yeah, I think we should do something about this.

A PR would also be welcome, of course :)

All 7 comments

By the way this is a fresh vue init from the webpack template. No changes except to .postcssrc.js

So why should .postcssrc.js be ignored here?

It seems it was a conscious decision to catch and swallow that error:

https://github.com/vuejs/vue-loader/blob/master/lib/style-compiler/load-postcss-config.js#L14

But I'm not sure what was a wise decision.

Oh I misunderstood this earlier.

I don't think it's good to completely ignoring errors, but now we only have an error message to tell if the error is a bearable one. Depending on 'No PostCSS Config found' may seem ugly but it works for the current issue IMO.

Yes, please reconsider swallowing errors. I wasted several hours on this very simple issue bedeviling me because I wasn't getting any error indicating something was wrong, which means others might have a similar experience

yeah, I think we should do something about this.

A PR would also be welcome, of course :)

Just simply wrapped a error message #1095
Hope to be helpful.
Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yozman picture yozman  路  4Comments

Makio64 picture Makio64  路  4Comments

amorphine picture amorphine  路  3Comments

NextSeason picture NextSeason  路  3Comments

sdvcrx picture sdvcrx  路  3Comments