node-poppler
node-poppler copied to clipboard
Put windows poppler binaries in a separate package
Prerequisites
- [X] I have written a descriptive title
- [X] I have searched existing feature requests to ensure it has not already been proposed
- [X] I agree to follow the Code of Conduct that this project adheres to
Description
Hello, I've noticed that this package bundles all the windows binaries regardless of what platform it's being installed on.
I suggest putting all the windows binaries into a separate package and adding
"os": [
"win32"
]
to that packages package.json.
You can then include that package using optionalDependencies which will only install the package if we are on windows and ignore it on any other platform.
Doing this will remove over 99% of the unpacked package size.
Having to include almost 50MB of unused files in a docker image is not great (especially since you need to install the Linux binaries on top of that anyway).
Also might as well include
"cpu": [
"x64",
]
while you're at it since the binaries won't work on x86 or arm builds of windows.
Thanks @dumbasPL, I had considered just having a duplicate separate package without the windows binaries, however had never thought about using an optionalDependency!
I'll take a look (though I won't be able to until next week).
Any progress on this?
Hiya, unfortunately not, been a bit swamped with other projects.
Hi, I've noticed you added the help wanted label. What kind of help is needed?
Essentially things that need to be done are:
- [ ] Create a new npm package with
"os":["win32"]and"cpu":["x64"]that only contains the windows binaries - [ ] (optional) create any additional packages with binaries for other operating systems/architectures
- [ ] Remove binaries from this package
- [ ] add the new package(s) as
optionalDependenciesin the current package - [ ] Update paths to search for binaries in the new location
Thanks @dumbasPL, yes I put the tag on because I was struggling to find the time to sort this.
Should hopefully be able to sort it some time this year!