You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The minified size is less dramatic but that's still a big beast which could be easily made done more lightweight when trying to modularize a bit more the library.
For example, Faye is only intended when using the Streaming API and CSV-parse /csv-stringify are probably also for very specific use case. When one just wants to use a specific API (e.g. REST), many node modules are included which are just not necessary. And also the source code of course.
External libraries could be also removed, such as Lodash where, with ES6, it's mostly obsolete or Promise which is likewise obsolete and if one wants to still be ES5 compliant, this could be transformed through a module bundler / babel etc.
There is a big room for improvement and that's even more critical when included in browsers / mobile devices
@Krisa As of today the streaming api is optional when you use jsforce-core bundle. There is how to use the core module in webpack environemnt. #381 (comment)
Of course there still are many spaces to reduce the bundle size. We are currently struggling with it.
We hit an issue in our project with the use of lodash. We use lodash 4.17.1 and jsforce uses 4.13.0. 4.17.1 introduced the _.merge feature, so when we loaded jsforce after existing libs it broke the app. Ideally jsforce wouldn't include lodash if possible (we're also looking to remove it), but I can see other people hitting similar issues too.
Activity
0cv commentedon Nov 15, 2016
The minified size is less dramatic but that's still a big beast which could be easily made done more lightweight when trying to modularize a bit more the library.
For example, Faye is only intended when using the Streaming API and CSV-parse /csv-stringify are probably also for very specific use case. When one just wants to use a specific API (e.g. REST), many node modules are included which are just not necessary. And also the source code of course.
External libraries could be also removed, such as Lodash where, with ES6, it's mostly obsolete or Promise which is likewise obsolete and if one wants to still be ES5 compliant, this could be transformed through a module bundler / babel etc.
There is a big room for improvement and that's even more critical when included in browsers / mobile devices
stomita commentedon Nov 22, 2016
@Krisa As of today the streaming api is optional when you use
jsforce-corebundle. There is how to use the core module in webpack environemnt.#381 (comment)
Of course there still are many spaces to reduce the bundle size. We are currently struggling with it.
mattgoldspink commentedon Mar 1, 2018
We hit an issue in our project with the use of lodash. We use lodash 4.17.1 and jsforce uses 4.13.0. 4.17.1 introduced the _.merge feature, so when we loaded jsforce after existing libs it broke the app. Ideally jsforce wouldn't include lodash if possible (we're also looking to remove it), but I can see other people hitting similar issues too.
We've been following https://youmightnotneed.com/lodash/ to remove some of our usage.
cristiand391 commentedon Jul 15, 2024
This should be fixed in v3, see: #1529