I have a yarn 2 workspaces project with two workspaces:
|-foo
\-bar
Now, in the root package.json
, I pull in common dev-depenencies:
"devDependencies": {
"@rollup/plugin-commonjs": "^14.0.0",
"@rollup/plugin-node-resolve": "^8.4.0",
"@rollup/plugin-replace": "^2.3.3",
"@rollup/plugin-typescript": "^5.0.2",
"@types/jest": "^26.0.13",
"nollup": "^0.13.10",
"rimraf": "^3.0.2",
"rollup": "^2.23.1",
"ts-jest": "^26.3.0",
"tslib": "^2.0.1",
"typescript": "^4.0.2"
}
How can I easily (without too much boilerplate) now reference rollup, etc. from scripts in the package.json of foo and bar?
Example: foo/package.json
"build": "rollup ...",
Writing "../node_modules/.bin/rollup" sucks.
Note, I don't want to install rollup etc globally.