UNPKG

696 BJavaScriptView Raw
1"use strict";
2
3exports.__esModule = true;
4exports.statefulSourcePluginsReducer = void 0;
5/**
6 * Flags a source plugin as being "stateful" which means it manages its own data updates and Gatsby doesn't look for "stale" nodes after each `sourceNodes` run.
7 */
8const statefulSourcePluginsReducer = (statefulSourcePlugins = new Set(), action) => {
9 switch (action.type) {
10 case `ENABLE_STATEFUL_SOURCE_PLUGIN`:
11 {
12 statefulSourcePlugins.add(action.plugin.name);
13 return statefulSourcePlugins;
14 }
15 default:
16 return statefulSourcePlugins;
17 }
18};
19exports.statefulSourcePluginsReducer = statefulSourcePluginsReducer;
20//# sourceMappingURL=stateful-source-plugins.js.map
\No newline at end of file