Closed soerenbf closed 9 months ago
@soerenbf sorry I didn't have time to look at this before it got merged. Do you have some references on tree shaking/ESM that explain why these changes are necessary? Do we need to change anything about how we build/publish/use this project?
Webpack has documentation on tree-shaking here, which I think is the standard implementation for bundlers in general.
To sum up, ES modules facilitate tree shaking (or dead code elimination) for bundlers, commonJS modules do not. As the SDK is only published with ES modules from version 10 and onwards, all libraries using the SDK need to follow suit in preparation of upgrading their reference to the SDK to the latest version.
Does that make sense?
In preparation of releasing https://github.com/Concordium/concordium-node-sdk-js/pull/266, we need to also update the libraries included in this repo to be tree-shakable.
Changes
Checklist