node-sqlcipher
node-sqlcipher copied to clipboard
Webpack node-sqlcipher
I tried to add to mozilla-iot code , @ry @journeyapps/sqlcipher
gateway/build/webpack:/src/sqlcipher/lib sync:2
var e = new Error("Cannot find module '" + req + "'");
^
Error: Cannot find module gateway/src/sqlcipher/lib/binding/napi-v6-linux-x64/node_sqlite3.node'
at webpackEmptyContext (gateway/build/webpack:/src/sqlcipher/lib sync:2:1)
at Object.
Native node modules are in general not well suited for webpack.
You should be able to exclude it from bundling by using externals, for example:
module.exports = {
// ...
externals: {
'@journeyapps/sqlcipher': 'commonjs2 @journeyapps/sqlcipher',
}
};
(not tested, and will depend on your specific setup)