Keytar cannot be found in production
-
My electron app works with keytar in development. However, in production, I am getting an error, “Error: Cannot find module ‘keytar’” when calling window.require(‘keytar’). How can I ensure that keytar is bundled in production? I’ve tried using “import ‘keytar’” to get webpack to bundle it, but it didn’t work.
-
Found the answer, it needs to be installed using --save instead of --save-dev