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.
Steps to reproduce:
a.js
rollup -i a.js -o b.js -w
Now in the
a.js
file write this: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.