Skip to content

Commit

Permalink
quick fix for eleventy dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
noelforte committed Oct 22, 2024
1 parent 452d758 commit 2f32efb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/hungry-swans-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'eleventy-plugin-vento': patch
---

Clear vento cache on every template change
8 changes: 8 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"mode": "pre",
"tag": "next",
"initialVersions": {
"eleventy-plugin-vento": "3.0.2"
},
"changesets": []
}
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ export function VentoPlugin(eleventyConfig, userOptions) {
engine.loadShortcodes(pairedShortcodes, true);
}

// HACK: Clear entire vento cache on rebuild to force updates
eleventyConfig.on('eleventy.before', () => engine.emptyCache());

// Add vto as a template format
eleventyConfig.addTemplateFormats('vto');

Expand Down

0 comments on commit 2f32efb

Please sign in to comment.