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

Throw error when config is undefined#43

Open
resynth1943 wants to merge 6 commits into
denofn:mainfrom
resynth1943:patch-1
Open

Throw error when config is undefined#43
resynth1943 wants to merge 6 commits into
denofn:mainfrom
resynth1943:patch-1

Conversation

@resynth1943

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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.

Shouldn't be editing things in GitHub.
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