sveltejs / svelte-loader

Webpack loader for svelte components.
MIT License
594 stars 73 forks source link

warn on missing svelte condition #225

Closed Rich-Harris closed 1 year ago

Rich-Harris commented 1 year ago

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.