Conversation
ESM config files support was added in 3.3.0.
| "description": "WALLET AND EXCHANGE CLIENT FOR THORCHAIN, MAYACHAIN, CHAINFLIP", | ||
| "main": "build/main/electron.js", | ||
| "type": "module", | ||
| "exports": "build/main/electron.js", |
There was a problem hiding this comment.
When "type": "module", is added exports": "build/main/electron.js" shows a `String does not match the pattern of "^./". warning.
yarn dev fails
error during start dev server and electron app:
Error: No entry point found for electron app, please add a "main" field to package.json
Could be fixed via
"main": "./build/main/electron.js",
"exports": {
".": "./build/main/electron.js"
},|
@dynst getting an error when doing a rebuild: Not sure why as Either is imported and present. I assume they need to be imported differently in |
|
ESM asgardex-desktop/electron.vite.config.mjs Line 23 in aae5c1b https://vite.dev/config/shared-options#resolve-extensions But that field has a decent default, anyway, even if it wasn't set. And it's only applicable to internal files, not for external dependencies. I guess we're not supposed to reach into the
There's a lot of import statements just like this one that bypass the module's official top-level |
It matters now that it's true ESM.
Electron 28 and newer has ESM support now.