journeyapps / node-sqlcipher

SQLCipher bindings for Node
https://journeyapps.com
BSD 3-Clause "New" or "Revised" License
207 stars 66 forks source link

How to reduce the installation package after electron integrates @journeyapps/sqlcipher ? #82

Closed dlliu114 closed 2 years ago

dlliu114 commented 3 years ago

Installation package after electron integrates @journeyapps/sqlcipher is too large(102MB). Package after electron integrates sqlite3 just 60+MB. How to reduce package after integrates @journeyapps/sqlcipher ? electron version: 10.1.5 @journeyapps/sqlcipher version: 5.2.0

terry2010 commented 2 years ago

you could delete some folders and files after your compile, electron only need these files ,maybe less?

├── binding.gyp ├── lib │   ├── binding │   │   └── napi-v6-darwin-x64 │   │   └── node_sqlite3.node │   ├── index.js │   ├── sqlite3-binding.js │   ├── sqlite3.js │   └── trace.js ├── package-lock.json ├── package.json ├── sqlite3.js

rkistner commented 2 years ago

When using a tool like electron-builder, you can configure it to exclude files. I'm using something like this:

files:
  - '**/*'
  - '!src/**'
  - '!**/*.{tlog,lastbuildstate,pdb,obj,lib,map,exp,vcxproj,vcxproj.filters}'
  - '!**/sqlcipher/deps'
  - '!**/binding/node-*'
rkistner commented 2 years ago

The package size should be reduced in v5.3.0.

dlliu114 commented 2 years ago

The package size should be reduced in v5.3.0.

Thank you very much