You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi wonderful team making the new electron start sooooo easy!
I've started a new project last week, and when importing 'electron-store' in the renderer, the following issue happen.
'electron-store' v10 is now pure ESM, which why adding 'electron-store': { type: 'cjs' }, did change the error but did not solve it (neither 'type: esm', : require is not defined )
It seems there were already fixes for electron-store ESM v10 but all the examples and docs are for the CJS v8 package and the default config changes don't seems to work for me.
Uncaught Error: Dynamic require of "process" is not supported
at chunk-UN725CXD.js?v=f7b7e0dc:15:9
at electron-store.js?v=f7b7e0dc:14821:11
--- electron-store.js
// node_modules/.vite-electron-renderer/process.mjs
var avoid_parse_require = __require;
var _M_ = avoid_parse_require("process");
--- chunk-UN725CXD.js
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
}) : x)(function(x) {
if (typeof require !== "undefined") return require.apply(this, arguments);
throw Error('Dynamic require of "' + x + '" is not supported');
});
Hi wonderful team making the new electron start sooooo easy!
I've started a new project last week, and when importing 'electron-store' in the renderer, the following issue happen.
'electron-store' v10 is now pure ESM, which why adding
'electron-store': { type: 'cjs' },
did change the error but did not solve it (neither 'type: esm', :require is not defined
)It seems there were already fixes for
electron-store
ESM v10 but all the examples and docs are for the CJS v8 package and the default config changes don't seems to work for me.Related lib:
vite.config.js
The text was updated successfully, but these errors were encountered: