Hello!
I am developing an app where my @app.before_server_start routine got a bit complex and startup takes a fair bit of time.
I am using Sanic with Jinja2 (via the external plugin), with this command:
sanic app -H :: --no-repl --no-motd --dev
Before using sanic ext i just used a jinja2 global template added to the context, with cache disabled.
This would have the effect of letting me edit templates and see the effect instantly, without the whole app restarting.
Using sanic[ext], however, adds templates/ to the watched directories, so every change to the folder will trigger a restart, even my text editor creating temp files (every 10 seconds due to the “auto-save crash recovery” function). This makes developing with the “–dev” flag impossible since every key stroke in a template will make sanic restart.
So, would it be possible to configure the external template plugin not to add the folder to the auto reload, and to just disable template caching?