Reputation: 314
part of my package.json
:
"optionalDependencies": {
"cypress": "^8.2.0",
"cypress-commands": "^1.1.0",
"cypress-expect": "^2.4.1",
"cypress-file-upload": "^4.1.1"
},
I know that npm install --no-optional
prevents optinal dependencies to be installed locally. But no idea how to pass that flag on Heroku
Upvotes: 4
Views: 315
Reputation: 185
heroku config:set NPM_CONFIG_OMIT=optional
And this is exactly what it's needed for. We don't want heroku spending time and resource loading and building test packages.
Upvotes: 2