Search code examples
bun

How to provide file extensions for Bun to watch?


I'm using bun --watch src/main.ts to run an express app with twig templates. When I change ts files, it reloads as it should. When I change twig files - it doesn't. nodemon has an option -e js,twig, where I can specify the extensions to watch. Is there a similar thing for Bun?


Solution

  • nodemon -e ts,twig --exec 'bun src/main.ts'

    worked for me