Skip to content

Commit

Permalink
Adds eleventy.reset event, triggers when a config reset happens.
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed May 10, 2024
1 parent 05fced0 commit 8400e40
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,8 @@ Arguments:
// reset and reload global configuration
if (isResetConfig) {
await this.resetConfig();
// important: run this before config resets otherwise the handlers will disappear.
await this.config.events.emit("eleventy.reset");
}

await this.restart();
Expand Down

0 comments on commit 8400e40

Please sign in to comment.