rollup / rollup-watch

Fast incremental rebuilds with Rollup CLI
MIT License
91 stars 23 forks source link

Runs forever if importing the output file. #15

Closed ghost closed 7 years ago

ghost commented 8 years ago

Steps to reproduce:

  1. create a empty .js file and name it a.js
  2. In the cli, do: rollup -i a.js -o b.js -w

Now in the a.js file write this:

import ab from b.js

What you will see in the console.log is that the watch task runs forever like crazy! There are other similar approached that can trigger this as well as other combinations.

And in this example there is no export / export default and still no errors are thrown.

NOTE! This error doesn't occur when you start the watch task from the CLI. You have to add the code while then watch task is running.

Else you get this message: Error: A module cannot import itself

Other errors are also not thrown while the watch task is running. E.g duplicate import statements.

Rich-Harris commented 7 years ago

Fixed in 3.0.0. Thanks