nathanbuchar / electron-settings

📝 A simple persistent user settings framework for Electron.
https://electron-settings.js.org
MIT License
814 stars 60 forks source link

atomically - require() of ES Module #178

Open davekobrenski opened 1 year ago

davekobrenski commented 1 year ago

In version 5.0.0, the settings.js file attempts to require atomically (ES module) instead of import, and thus throws an error. Seems like an easy fix?

require() of ES Module [...]/atomically/dist/index.js from [...]/electron-settings/dist/settings.js not supported.

Instead change the require of index.js in [...]/settings.js to a dynamic import() which is available in all CommonJS modules.

I see that version 5.0.0 is only a few hours old :)

nathanbuchar commented 1 year ago

Woopsies, sorry about that. Thank you for flagging.

@quanglam2807 FYI

quanglam2807 commented 1 year ago

Thanks for reporting. It's likely we might have to move the project to ES Module.

I used webpack so I didn't encounter this issue at all.

Mad-Chemist commented 1 year ago

Was just running into this issue and realized it's a fresh release hah

nathanbuchar commented 1 year ago

In the meantime, I've assigned the @latest npm dist tag back to electron-settings@4.0.2. @quanglam2807, let me know when this issue has been fixed and we're ready to publish this again under v5.0.1.