Air not live reloading page
DnzzL opened this issue ยท 1 comments
DnzzL commented
Hello,
Thank you for your amazing work ๐
When I'm updating code, although air
is aware of a templ file change, it doesn't live reload the UI.
Any clue why ?
DnzzL commented
I've found a solution
With this air.toml
:
root = "."
testdata_dir = "testdata"
tmp_dir = "tmp"
[build]
args_bin = []
bin = "./tmp/main"
cmd = "go build -o tmp/main ./cmd"
delay = 1000
exclude_dir = ["assets", "tmp", "vendor", "testdata"]
exclude_file = []
exclude_regex = []
exclude_unchanged = false
follow_symlink = false
full_bin = ""
include_dir = []
include_ext = ["go", "tpl", "tmpl", "templ", "html", "css", "js", "env", "yaml"]
include_file = []
kill_delay = "0s"
log = "build-errors.log"
send_interrupt = false
stop_on_error = true
[color]
app = ""
build = "yellow"
main = "magenta"
runner = "green"
watcher = "cyan"
[log]
main_only = false
time = false
[misc]
clean_on_exit = false
[screen]
clear_on_rebuild = false
keep_scroll = true
and with 3 terminals doing respectively, air
make templ-watch
and make tailwind-watch
where templ-watch is like templ generate --watch --proxy=http://localhost:8080