When Node is installing dependancies, there is a variable we can use to conditionally run something in production/!production
{ | |
"scripts": { | |
"postinstall": "if [ -n \"$npm_config_production\" ]; then npm run build; fi" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment