Configure Electron build process to output main and preload bundles as ES instead of CommonJS.
That is possible since electron 28.0.0.
It is needed to upgrade dependencies which do not support CommonJS anymore:
electron-store@10.0.0 (this is for sure)
long really? To be confirmed
@noble/hashes@2.0.0 really? To be confirmed
Because we use bundler (webpack) this solves most of our problems, because the bundler takes ESM package and squashes it into output js file. So actually only libraries which cannot be bundled (e.g. have a .node binary) and need to have a runtime require are a problem.
Configure Electron build process to output
mainandpreloadbundles as ES instead of CommonJS.That is possible since electron 28.0.0.
It is needed to upgrade dependencies which do not support CommonJS anymore:
electron-store@10.0.0(this is for sure)longreally? To be confirmed@noble/hashes@2.0.0really? To be confirmedBecause we use bundler (webpack) this solves most of our problems, because the bundler takes ESM package and squashes it into output js file. So actually only libraries which cannot be bundled (e.g. have a .node binary) and need to have a runtime require are a problem.