Skip to content

Commit

Permalink
Ensure changes to withOptions plugins trigger rebuilds
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwathan committed Oct 17, 2020
1 parent ec68efd commit d371727
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/util/createPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ createPlugin.withOptions = function(pluginFunction, configFunction = () => ({}))

optionsFunction.__isOptionsFunction = true

// Expose plugin dependencies so that `object-hash` returns a different
// value if anything here changes, to ensure a rebuild is triggered.
optionsFunction.__pluginFunction = pluginFunction
optionsFunction.__configFunction = configFunction

return optionsFunction
}

Expand Down

0 comments on commit d371727

Please sign in to comment.