Skip to content
This repository was archived by the owner on Feb 20, 2019. It is now read-only.
This repository was archived by the owner on Feb 20, 2019. It is now read-only.

rollup-watch writing logs to stderr instead of stdout #11

@talmobi

Description

@talmobi

Hello!

TL;DR: Could rollup-watch use stdout when logging basic info on watch/bundles and only stderr when an actual build error occurs?

I'm running "rollup -w -c" with a child_process.spawn and listening to its stdout and stderr streams.

the stdout stream is never used and only stderr is used. This is confusing when detecting errors.

For example on successful bundling a two lines are logged

bundling...
bundled in 37ms. Watching for changes...

But these messages are all piped through stderr (and not stdout as one would expect).

When an actual error occurs the stderr is used again (as expected) -- but in addition the streams are also closed. So the only way to detect an error has occurred is to listen for the spawns 'end' event and then re-execute "rollup -w -c" manually once a change has occurred (since rollup -w -c currently does not itself recover from errors (but that's not the point here)).

For example, stylus works as expected in that it uses stdout to log basic info when it is watching and bundling, and when an error occurs it uses stderr.

stylus -w -r -i main.styl -o bundle.css

I looked at the source and couldn't find what I was looking for -- could this be an issue with rollup itself as opposed to rollup-watch?

Thanks a bunch!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions