从命令行使用 rollup.js 时是否有监视选项

Is there a watch option when using rollup.js from the command line

我正在使用 rollup.js 从文件 'main.js'

转译模块依赖项
rollup main.js

是否有监视选项可以在源文件更改时重新运行转译

v0.29 开始,您可以使用 rollup --watch.


还没有 (command line options). There has been an issue opened for this just yesterday.

Rich-Harris 写道:

Agree. We intend to add some functionality around incremental builds (#191), and this would go hand-in-hand with that. The goal would be for the incremental build stuff to be flexible enough to integrate with existing build systems, but I think it'd make sense for the CLI to support it out of the box:

rollup -c --watch