1 year ago

npm run prod, commits, and forge

Posted 1 year ago by godbout

i don't get how the workflow is supposed to be. i develop on my local machine with npm run watch. my package.json and package-lock.json are committed. then i push to github, that sends the hook to forge. forge tries to install the repo but every time it can't because npm run prod generates a different package.json and package-lock.json and it can't merge. that means that every time before pushing my commits, i need to remember to run npm run prod to be sure i'll get the same files than on production. this is dumb. anyway to improve this? i thought that would work like composer, once you get your composer.json and composer.lock, they are not rewritten when installing on the server. but npm rewrites everything, breaking the repository pull.

Please sign in or create an account to participate in this conversation.