ojkelly/yarn.build

[BUG] build does not recognise previous build and rebuilds whole repo

Closed this issue · 3 comments

Describe the bug & reproduction

  1. Running yarn build in root builds the entire repo.
  2. .yarn/yarn.build.json is created.
  3. Running yarn build in the root builds the entire repo again.

Expected behavior
I would expect that the second invocation would build nothing (as none of the inputs have changed)

Screenshots
n/a

Desktop (please complete the following information):
OS: Debian Buster
Yarn: v2.4.0-git.20201213.364c3992
Yarn Build: v0.9.1
Node: 14.15.1

Additional context
.yarn/yarn.build.json contains many entries such as

    "utils/logger#build": {
      "lastModified": 1607973614163.1296,
      "status": "succeeded",
      "haveCheckedForRerun": true,
      "rerun": false,
      "command": "build"
    },

This might be a situation where you need to configure the output folder. By default we assume build as the output folder and ignore it, but this isn't always the case.

On a per package basis you can add the following to package.json to tell yarn.build what folder (relative to and inside the package folder) to ignore:

   "yarn.build": {
     "output": "dist"
   },

Additionally you can override the defaults with a top level yarnbuildrc.yml file described here https://github.com/ojkelly/yarn.build#config

If they don't work, can you have a look and see what files change before and after a build?

Configuring those settings in .yarnbuildrc.yml seems to have resolved it. PEBCAK eh?
Thank you!

awesome glad to hear!

Nah more a case of me needing to get the documentation in order :D