Skip to content
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

Errors in vue.config.js are swallowed #874

Closed
chrisvfritz opened this issue Feb 23, 2018 · 2 comments
Closed

Errors in vue.config.js are swallowed #874

chrisvfritz opened this issue Feb 23, 2018 · 2 comments
Labels

Comments

@chrisvfritz
Copy link
Contributor

Version

3.0.0-alpha.13

Reproduction link

https://github.com/chrisvfritz/vue-enterprise-boilerplate

Steps to reproduce

Add a syntax error or throw an error from vue.config.js.

What is expected?

I would expect Vue CLI commands that require vue.config.js to fail loudly when it contains an error, making me aware of the source of the problem (or even that there is a problem).

What is actually happening?

Vue CLI will swallow it and continue as if everything is normal. I noticed this behavior when Webpack was acting as if my aliases were not defined. It took a little while to figure out that there was a syntax error in a file required from vue.config.js.

@LinusBorg
Copy link
Member

LinusBorg commented Feb 25, 2018

The require statement for the file is wrapped in a try/catch that swallows the error, I assume?

https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-service/lib/Service.js#L163-L171

@chrisvfritz
Copy link
Contributor Author

@LinusBorg Thanks for digging into it! Made submitting a fix much easier. 🙂

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

No branches or pull requests

2 participants