Closed dnichols closed 7 years ago
I wasn't using an appropriate loader { test: /\.node$/, loader: 'node-loader' }
in webpack.config.base.js
@dnichols, thank you a lot for sharing, using node-loader
fixed the same issue for me.
Thanks @dnichols, I hit the same problem, I ported the same solution over to Nuxt, by modifying nuxt.config.js
:
// nuxt.config.js
module.exports = {
build: {
extend(config, { isDev, isClient }) {
// Extend only webpack config for client-bundle
if (isClient) {
config.target = "electron-renderer";
// Required for node-keytar to load
config.module.rules.push({ test: /\.node$/, loader: "node-loader" });
}
},
...
}
Getting an error using keytar with this boilerplate during the build process: