11ty / eleventy

A simpler site generator. Transforms a directory of templates (of varying types) into HTML.

Home Page:https://www.11ty.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handlebars partials inside templates do not update

groenroos opened this issue · comments

Operating system

macOS Ventura 13.0

Eleventy

2.0.0

Describe the bug

With --serve, changes made to Handlebars partials (located inside the includes directory) that are used in templates (layouts) will seem to trigger an appropriate build, and the page will refresh, but the changes to the partial are ultimately not reflected (i.e. the old/cached version of the partial is still used for the build).

Changes to templates, or changes to partials used directly on pages, will build as expected. Turning off compileOptions.cache does not seem to have any effect.

Reproduction steps

  1. Have 11ty project using Handlebars
  2. Use a partial {{ some-partial }} (includes) inside a template some-template.hbs (layouts)
  3. Use the template some-template on a page some-page.hbs (input) via frontmatter
  4. Run npx @11ty/eleventy --serve and view the page /some-page in a browser
  5. Make a change to the some-partial partial

Expected behavior

The page should be re-built with the new contents of the partial.

Reproduction URL

No response

Screenshots

No response