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
Currently, when using tree shaking, parcel will select dependancies "browser" specified build over the actual raw source, this leads to tree shaken builds which are not tree shaken!
Parcel should either select the raw source and not the "browser" builds of dependancies or allow me to remove that option.
I have tried hacking it myself and removing my dependancies "browser" property from their package JSON, but parcel doesn't seem to handle it all very well.
To recreate, npm init a package, create an index.js and index.html, install ethers module and import it into your build, than do a parcel build with tree shaking enabled. You will see it includes the entire minified browser specified ethers.min.js and no a tree shaken version of ethers.
The text was updated successfully, but these errors were encountered:
SilentCicero
changed the title
allow browser or non-browser tree-shaking bundle option.
allow browser or non-browser tree-shaking bundle option
May 3, 2020
SilentCicero
changed the title
allow browser or non-browser tree-shaking bundle option
[feature / bug?] allow browser or non-browser tree-shaking bundle option
May 3, 2020
SilentCicero
changed the title
[feature / bug?] allow browser or non-browser tree-shaking bundle option
[feature / bug?] allow non-"browser" dependancy priority when tree-shaking
May 3, 2020
The problem is that the browser entry might have different behaviour than main or module and that there is no established browserModule field (not even with the new package.json#exports: #4155).
Currently, when using tree shaking, parcel will select dependancies "browser" specified build over the actual raw source, this leads to tree shaken builds which are not tree shaken!
Parcel should either select the raw source and not the "browser" builds of dependancies or allow me to remove that option.
I have tried hacking it myself and removing my dependancies "browser" property from their package JSON, but parcel doesn't seem to handle it all very well.
To recreate, npm init a package, create an index.js and index.html, install
ethers
module and import it into your build, than do a parcel build with tree shaking enabled. You will see it includes the entire minified browser specified ethers.min.js and no a tree shaken version ofethers
.The text was updated successfully, but these errors were encountered: