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

warn on missing svelte condition #225

Merged
merged 5 commits into from
Feb 15, 2023

Conversation

Rich-Harris
Copy link
Member

We plan to release a version of svelte-package that encourages package authors to omit the default export condition. To resolve these packages, svelte-loader users are required to have conditionNames: ['svelte'] in their webpack config.

With this change, we can identify cases where the field is not configured, and print a loud warning that will hopefully allow people to self-diagnose resolution failures and fix them. Once we ship docs for svelte-package, we could supplement this PR with a link to them.

index.js Outdated Show resolved Hide resolved
Copy link
Member

@benmccann benmccann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like a good plan to me

lgtm once the tests are passing

index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
@Rich-Harris Rich-Harris merged commit 8958820 into master Feb 15, 2023
@Rich-Harris Rich-Harris deleted the warn-on-missing-svelte-condition branch February 15, 2023 22:18
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.

4 participants