Skip to content

Why when I run yarn build it always build even if nothing has changed? #169

Answered by ojkelly
Hideman85 asked this question in Q&A
Discussion options

You must be logged in to vote

Great question!

The state of what's build is tracked here .yarn/yarn.build.json. Inside there, we track each command thats run. So yarn build and yarn test are tracked separately.

If any command re-runs if nothings changed, it means something did change. We look at the whole folder and check the last modified date for each file.

Typically this means output files are not being tracked and are being picked up as input. We try to guess based on node/npm conventions where your input and output files are.

You can explicitly define the input or output folders in package.json with:

{
  "name": "@internal/lorem-ipsum",
  "version": "1.0.0",
  "license": "UNLICENSED",
  "private": true,
  "scripts…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@Hideman85
Comment options

@ojkelly
Comment options

@ojkelly
Comment options

@Hideman85
Comment options

Answer selected by Hideman85
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants