Skip to content

Linking Strategies

Oink inspects each package’s folder layout and scripts to choose a strategy automatically. The strategy decides which build command runs and which folders are copied into the consumer’s node_modules.

StrategyHow it is detectedBuild commandCopied folders
TRANSPILEDrollup.config.mjs exists.yarn --cwd <pkg> transpiledist, web, lib, plus package.json.
TRANSPILED_LEGACYNo rollup config, but a build script is present.yarn --cwd <pkg> buildSame as TRANSPILED.
LEGACY_AMEND_WEB_HYBRIDContains amend and lib, and either web or dist, with a build script.yarn --cwd <pkg> buildamend, boundaries, lib, dist, web, plus package.json.
AMEND_NATIVEIncludes amend and lib.No build step (prints a message that no transpilation is required).amend, boundaries, lib, plus package.json.
MAKEFILE_BUILDHas a Makefile.make -C <pkg>dist, web, lib, plus package.json.
NOBUILD_SOURCEContains src or lib and can be used as-is.No build step.src, lib, plus package.json.
  • Strategies are checked in the order listed. The first match wins.
  • Files are copied into every matching installation, including hoisted workspace locations and the package’s own node_modules.
  • Oink removes existing targets before copying so stale files do not linger. Avoid storing unrelated assets in these folders.
  • package.json is always copied to keep metadata in sync.

If your package does not fit any strategy, mimic one of the layouts above (for example, add dist/ or lib/ folders) and try again. For long-term changes, coordinate with maintainers so a new strategy can be added safely.