import * as params from '@params';
console.log("apple")
console.log(params.toLog)
I am able to build the site with hugo server -D --logLevel debug but when I make changes to example.js (for example changing “apple” to “banana”) I don’t see them propagate to the website unless I save either the markdown or the html files. Is there some way to tell Hugo to watch the scripts in the assets directory and rebuild when they are changed?
But it seems it hasn’t changed anything.
When I make a change to my javascript file I get the following output from the server:
INFO Received System Events: [WRITE "assets/js/example.js" WRITE "assets/js/example.js"]
Change detected, rebuilding site.
2024-01-09 19:21:43.934 -0500
DEBUG Rebuild for events ["WRITE \"assets/js/example.js\""]
DEBUG cachebuster: Matching "assets/js/example.js" with source "assets/watching/hugo_stats\\.json": no match
DEBUG cachebuster: Matching "assets/js/example.js" with source "(postcss|tailwind)\\.config\\.js": no match
DEBUG cachebuster: Matching "assets/js/example.js" with source "assets/.*\\.(js|ts|jsx|tsx)": match!
DEBUG cachebuster: Matching "assets/js/example.js" with source "assets/.*\\.(.*)$": match!
DEBUG Matching "js/js/example.js" with target "js": match!
DEBUG Matching "js/js/example.js_d28410f0311055565dece0539fa48437" with target "js": match!
INFO build: running step process duration 691.372µs
INFO build: running step assemble duration 190ns
INFO build: running step render duration 996.592µs
INFO build: running step postProcess duration 85.573µs
Total in 2 ms
But no changes flow on to the rendered site until I save the shortcode html.