Open ChrisTalman opened 7 years ago
It could do, yeah. watch
modes can get surprisingly complicated — the built-in fs.watch
is unreliable on some platforms so you sometimes have to use something like chokidar, which can also be a bit of a pain, and you have to handle all kinds of weird cases like files being renamed, files being created in a watched directory, etc.
So we haven't bothered with that yet because for the most part it's best left to things like webpack and Rollup (with rollup-watch) — they've already solved these problems, and have extra features (like CSS extraction) that are maybe a little harder to do via a CLI.
But it would be a good addition in the longer term. PRs always welcome! 😀
Yeh I'm using rollup-watch (with rollup-plugin-svelte of course). Single responsibility principle?
Should the CLI include a
-watch
option? It could be useful during development. It could be similar towatch
in TypeScript.