wclr / ts-node-dev

Compiles your TS app and restarts when files are modified.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handlebars (.hbs) files are not being watched

Andrew15-5 opened this issue · comments

Issue description

At first, I was confused as to why ts-node-dev doesn't watch .hbs files (because with nodemon it worked, but I can't make it to see .d.ts files).

Then I thought that .hbs files are not really a dependency for a server (they are) and that I should manually refresh browser tab to make server read updated .hbs files. No, it doesn't work. I don't know why, but I'm guessing it's some kind of caching or read-only-once thing with handlebars/express. In any case, when I delete a DOM element from a .hbs file, it won't disappear in a browser tab until I restart my express server.

So now I'm again confused why ts-node-dev doesn't look for .hbs files and there are no options in node-dev/ts-node to watch files with hbs extension. And there are no issues about hbs at all! Am I the only one who's missing something? Please help.

Context

OS version (is it docker or host?), ts-node-dev version

Host Pop!_OS 22.04

Did you try to run with ts-node?

Problem with restarting.

Did you try to run with --files option enabled?

Yes.

Did you try to run with --debug option enabled?

Yes.

Do you have a repro example (git repo) with simple steps to reproduce your problem?

No, but I can make one, if needed.

@Andrew15-5
maybe you can use --watch option watch your .hbs files.

--watch - Explicitly add arbitrary files or folders to watch and restart on change

Oh... yeah... this one slipped under my radar. Thanks, it works!