Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Cannot destructure property 'output'
1 participant