You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the previous versions we introduced a convenient mode: wildcard exports that allows you to write * to match all the exports.
However this makes the exports matching more complex and unpredicable.
It will make the exports parser super difficult to match it also it might mismatch the cases since each condition have different export. If you enumerate all cases in package.json like below, it's also not accurate since you don't know some has this condition development and another probably don't.
Another limitcation is it's hard to use the extension to decide if you want to output cjs or mjs.
With another introduced feature bunchee --prepare we probably don't need anything to do it manually, instead you can just run the command. Comparing to the uncertain and unclear configuration, I decdided to deprecate the wildcard feature.
The text was updated successfully, but these errors were encountered:
huozhi
changed the title
Deprecate wildcard exports
[RFC] Deprecate wildcard exports
Mar 3, 2024
Thank you, I wouldn't say it's a less considered feature, it's more like with the project evolving we have different ways to handle the cases and bump to the new obstacles
In the previous versions we introduced a convenient mode: wildcard exports that allows you to write
*
to match all the exports.However this makes the exports matching more complex and unpredicable.
Imaging you have entries:
Where
foo
has development optimize condition butbar
only has a edge runtime condition.And when you are using
*
in exports config like belowIt will make the exports parser super difficult to match it also it might mismatch the cases since each condition have different export. If you enumerate all cases in package.json like below, it's also not accurate since you don't know some has this condition
development
and another probably don't.Another limitcation is it's hard to use the extension to decide if you want to output cjs or mjs.
With another introduced feature
bunchee --prepare
we probably don't need anything to do it manually, instead you can just run the command. Comparing to the uncertain and unclear configuration, I decdided to deprecate the wildcard feature.The text was updated successfully, but these errors were encountered: