hot reloading of 11ty ESM config dependencies (v3) #3270
Labels
bug: --serve restart
Changes to projects shouldn’t need to restart dev server
bug
release: canary
A release on the canary channel
Milestone
Is your feature request related to a problem? Please describe.
Imports inside the ESM 11ty config file are not reevaluated in 11ty version 3, i mean there is no hot reloading of these dependencies while being in watch mode.
Describe the solution you'd like
Hot reloading of ESM 11ty config dependencies works while being in watch mode.
Describe alternatives you've considered
No response
Additional context
The (old) related issue for CommonJS modules: #1052
For ESM it is probably not possible because "The esm cache is not exposed, and even if it were, it is not mutable." (More info here: nodejs/help#2806)
In my usecase i used a cachebuster, like described here: https://ar.al/2021/02/22/cache-busting-in-node.js-dynamic-esm-imports/#cache-invalidation-in-esm-with-dynamic-imports (please note: this causes a memory leak)
So, as far as i understand, adding hot relaoding for ESM is not possible in a standard way for now? Or did i miss something here?
(Otherwise 11ty v3 works really well, great work!)
Thanks! 🙏
The text was updated successfully, but these errors were encountered: