-
Notifications
You must be signed in to change notification settings - Fork 19
Description
I know that this has somewhat been discussed in:
But the issue I'm facing is slightly different so I've decided to open a fresh one.
I understand why the current setup looks like it does and I can sympathize with you having to deal with that kind of issue as the current landscape of doing right by different tools is a mess (I also know this from experience 😉 ).
The problem is that assuming that "module"
should contain only browser-specific code is a little bit of a stretch. Yes, it is primarily understood by bundlers which are used for building web apps most of the time but bundling for the node as a target is also a use case for them and historically no such limitation has been imposed on the files distributed as "module". It got introduced only to support a different authoring format, not the target platform.
I know you are supporting "browser" field and I would encourage you to put browser-specific code only there, otherwise people bundling this for node with Parcel or webpack will get broken builds.