Skip to content

Commit d371727

Browse files
committed
Ensure changes to withOptions plugins trigger rebuilds
1 parent ec68efd commit d371727

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/util/createPlugin.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ createPlugin.withOptions = function(pluginFunction, configFunction = () => ({}))
1515

1616
optionsFunction.__isOptionsFunction = true
1717

18+
// Expose plugin dependencies so that `object-hash` returns a different
19+
// value if anything here changes, to ensure a rebuild is triggered.
20+
optionsFunction.__pluginFunction = pluginFunction
21+
optionsFunction.__configFunction = configFunction
22+
1823
return optionsFunction
1924
}
2025

0 commit comments

Comments
 (0)