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

Improved validation of empty or malformed svelte.config.js #1115

Closed
benmccann opened this issue Jul 23, 2021 · 1 comment
Closed

Improved validation of empty or malformed svelte.config.js #1115

benmccann opened this issue Jul 23, 2021 · 1 comment

Comments

@benmccann
Copy link
Member

Is your feature request related to a problem? Please describe.

SvelteKit had an empty svelte.config.js in one of its test projects. It gave the error message:

│ Error while loading config
│ TypeError: Cannot read property 'compilerOptions' of undefined

Describe the solution you'd like

It'd be nice if it checked if the config existed before trying to read compilerOptions off it:

It'd also be nice if it printed the path to the svelte.config.js in the error. SvelteKit had tons of them in various test projects, so it took a little while to track down

Additional context
See sveltejs/kit#1988

@dummdidumm
Copy link
Member

The error message should be better now.

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

No branches or pull requests

2 participants