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, I know that ECMAScript Modules are the future, but for now I have a problem using ESM packages in my Electron.js project. I think that having a "hybrid" package is better!
If my understanding is correct, we can extract the code from index.js to a new file index.cjs with a CJS style module.exports = and in index.js leave only a ESM style wrapper: import defaultShell from './index.cjs' and export default defaultShell.
The text was updated successfully, but these errors were encountered:
I don't plan to do a hybrid package. It comes with more problems than it solves. You can either stay on the previous version or use a bundler like Webpack.
Hi, I know that ECMAScript Modules are the future, but for now I have a problem using ESM packages in my Electron.js project. I think that having a "hybrid" package is better!
If my understanding is correct, we can extract the code from
index.js
to a new fileindex.cjs
with a CJS stylemodule.exports =
and inindex.js
leave only a ESM style wrapper:import defaultShell from './index.cjs'
andexport default defaultShell
.The text was updated successfully, but these errors were encountered: