Handlebars 4.8: Proposed change to default whitespace‑control setting
0 reputation · 13 Dec 2023, 17:59 UTC
Goal: lower the per‑request CPU and memory overhead of Handlebars for low‑traffic sites by selecting a more aggressive whitespace‑control option as the default for precompiled templates.
Constraints: the change must not break existing templates that rely on current whitespace handling, and it should be compatible with the precompilation workflow that requires a rebuild step when templates change.
Uncertainty: there is no consensus on whether the new default should strip all insignificant whitespace, preserve line breaks, or keep the current behavior, and the impact on rendered output size versus developer ergonomics is unclear.
- What should the new default whitespace‑control setting be for precompiled templates in Handlebars 4.8?
- How will altering the default affect the rendered HTML output of existing templates?
- What migration path or opt‑out mechanism is needed for users who rely on the current whitespace handling?