Support for webpack watch mode

Fixes #2