Can I remove phantom from bundle / reduce bundle size?


I was checking my bundle, because it’s becoming rather large. Thereby, I discovered that something related to apollo, is including phantomjs. Does anyone know which package is responsible for this, and if it can be removed? It will save 65 mb on a container.

Screenshots are made on Windows, but the build was made on a linux machine. Thereby I have a follow up question; can I somehow prevent the windows and darwin binaries from being included in the bundle? It will save another 46 mb on the container.


Maybe this can help?


Unfortunately, no. It doesn’t find anything.

I guess that’s because phantomjs doesn’t live in my default node_modules folder either. It’s only present in the meteor build. Also in my development .meteor/local/build * folder, but not in ./node_modules. Thereby, it looks like it’s installed by meteor. I just don’t understand why.

Same for the apollo-engine binaries. Why do I need all binaries in my bundle, when I’m specifically targeting Linux with --architecture=os.linux.x86_64?

* exact path is: .meteor/local/build/programs/server/npm/node_modules/meteor/apollo/node_modules/phantomjs-prebuilt