As a general rule you never commit anything from dist or build folders as every other developer in your team can run the script to build it themselves. You can automate it, so build is triggered together with yarn install or yarn start so then everybody running your app locally will have to build your dependencies first.
Different rule applies when you publish your project as npm package, then you might include dist folder as a ready to use dependency.
Okay, this isn't a published package but it is treated as fuck since it's a internal package our apps rely on. I'll just include dist instead of having each app build common first. Thanks
View all comments
Show parent comment
2
u/krisurbas May 29 '20
As a general rule you never commit anything from
distorbuildfolders as every other developer in your team can run the script to build it themselves. You can automate it, so build is triggered together withyarn installoryarn startso then everybody running your app locally will have to build your dependencies first.Different rule applies when you publish your project as npm package, then you might include
distfolder as a ready to use dependency.