We should move all CommonJS (CJS) usages to ECMAScript Modules (ESM). Should allow us to better take advantage of tree shaking 🌳 given ESM is more statically analyzable compared to CJS. This means potentially smaller bundles. Also, CJS is slowly phasing out in the javascript ecosystem.
Todo:
update the Webpack configuration to output ESM modules
refactor require/module.exports to import/export statements
We should move all CommonJS (CJS) usages to ECMAScript Modules (ESM). Should allow us to better take advantage of tree shaking 🌳 given ESM is more statically analyzable compared to CJS. This means potentially smaller bundles. Also, CJS is slowly phasing out in the javascript ecosystem.
Todo: