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

Throw error when config is undefined #43

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

resynth1943
Copy link

Closes #42

When a configuration file doesn't export a configuration file as default, ensure the configuration actually exists (it isn't undefined).

@resynth1943
Copy link
Author

I've chosen an error because that's more explicit. A || defaultConfig would lead to hard-to-debug errors, and confusing behaviour. Instead, we just throw an error to say "hey, your configuration file is wrong!".

@resynth1943
Copy link
Author

We don't do any validation on the import object aside from ensuring it's an object, because IIRC Rollup does runtime validation on the configuration object, and that would flag up any schema errors.

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

Successfully merging this pull request may close these issues.

[BUG] Cannot destructure property 'output'
1 participant