小编Sam*_*ina的帖子

lerna run --parallel 不适用于汇总表

背景:

我有一个带有两个包的纱线工作区的 lerna monorepo。我使用 rollup 作为打包器。

包/模块1/package.json:

{
  scripts: {
    "watch": "rollup -c rollup.config.js --watch",
    "build": "NODE_ENV=production && rollup -c rollup.config.js"
  }
}
Run Code Online (Sandbox Code Playgroud)

包/module2/package.json:

{
  scripts: {
    "watch": "rollup -c rollup.config.js --watch",
    "build": "NODE_ENV=production && rollup -c rollup.config.js"
  }
}
Run Code Online (Sandbox Code Playgroud)

预期行为:

  1. lerna run build将为build每个包运行脚本。
  2. lerna run watch将以watch监视模式运行每个包的脚本。

当前行为:

  1. lerna run build按预期工作。该build脚本对这两个包都可以正常运行。
  2. lerna run watch 只是挂在那里:
lerna notice cli v3.13.1
lerna info Executing command in 2 packages: "yarn run watch"
[[just hangs …
Run Code Online (Sandbox Code Playgroud)

rollupjs lerna yarn-workspaces

0
推荐指数
1
解决办法
3230
查看次数

标签 统计

lerna ×1

rollupjs ×1

yarn-workspaces ×1