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
I usually bundle (using rollup) all my javascript into 1 file, and package the 1 javascript file (rather than the usual practice of copying the entire node_modules directory without bundling).
This worked well for me until I introduced node-keytar dependency which is a node native module.
Obviously this can't get bundled so I set it as external in the rollup.config.js file.
I did not manage to get further that this. For non electron applications, standard practice is to use the bindings npm package and copy the build version of keytar.node file. bindings doesn't work with electron applications that choose to bundle the javascript.
I tried various techniques found on the internet but rollup kept complaining that it doesn't support dynamic requires.
How do I proceed from here? I think rollup documentation should provide guidance.
The text was updated successfully, but these errors were encountered:
My current workaround is to bundle as explained above. Then delete everything in node_modules directory (for packaging purposes) except for keytar directory (In fact I keep only keytar/build, keytar/lib and keytar/package.json).
Documentation Is:
Please Explain in Detail...
I am building an electron application.
I usually bundle (using rollup) all my javascript into 1 file, and package the 1 javascript file (rather than the usual practice of copying the entire
node_modules
directory without bundling).This worked well for me until I introduced
node-keytar
dependency which is a node native module.Obviously this can't get bundled so I set it as
external
in therollup.config.js
file.I did not manage to get further that this. For non electron applications, standard practice is to use the
bindings
npm package and copy the build version ofkeytar.node
file.bindings
doesn't work with electron applications that choose to bundle the javascript.I tried various techniques found on the internet but rollup kept complaining that it doesn't support dynamic requires.
How do I proceed from here? I think rollup documentation should provide guidance.
The text was updated successfully, but these errors were encountered: