It's a "lite" version of jsforce
that doesn't include the browser builds and CLI deps, making it ~30M smaller than the jsforce
package which includes all node and browser builds.
You can use it as a drop-in replacement of jsforce
in your Node.js project to reduce bundle size.
For reference, the jsforce
package contains:
- CJS & ESM builds for node
- ESM browser builds
- browser bundles + minified builds
- TS source code (src folder)
- CLI dependencies like
commander
andinquirer
This same repo!
Since jsforce-node
only removes builds and deps, we just modify the package.json
at release time to remove some folders/deps from the final package.
We run npm run jsforce-node
at publish time to make the following changes to the package.json
:
- Change
name
field to@jsforce/jsforce-node
- Remove browser/CLI-related folders from
files
field. - Remove
bin
field - Remove browser/CLI dependencies
Each jsforce
release will be followed by a @jsforce/jsforce-node
release, both having the same package version (e.g. jsforce@3.5.1
-> @jsforce/jsforce-node@3.5.1
).