r/reactjs •

Beginner's Thread / Easy Questions (May 2020)

[deleted] — view deleted post

0 Upvotes

401 comments sorted by

View all comments

Show parent comment

2

u/krisurbas May 29 '20

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.

1

u/[deleted] May 29 '20

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