@modern-js/plugin-garfish 2.0.0-beta.6 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -72,151 +72,165 @@ var __async = (__this, __arguments, generator) => {
72
72
  };
73
73
  var apps_exports = {};
74
74
  __export(apps_exports, {
75
- generateApps: () => generateApps
75
+ generateApps: () => generateApps,
76
+ pathJoin: () => pathJoin
76
77
  });
77
78
  module.exports = __toCommonJS(apps_exports);
78
79
  var import_jsx_runtime = require("react/jsx-runtime");
79
- var import_path = __toESM(require("path"));
80
- var import_react = __toESM(require("react"));
80
+ var import_react = require("react");
81
+ var import_runtime = require("@modern-js/runtime");
81
82
  var import_garfish = __toESM(require("garfish"));
82
- var import_runtime = require("@modern-js/plugin-router-v5/runtime");
83
83
  var import_util = require("../../util");
84
84
  var import_loadable = require("../loadable");
85
+ function pathJoin(...args) {
86
+ const res = args.reduce((res2, path) => {
87
+ let nPath = path;
88
+ if (!nPath || typeof nPath !== "string") {
89
+ return res2;
90
+ }
91
+ if (nPath[0] !== "/") {
92
+ nPath = `/${nPath}`;
93
+ }
94
+ const lastIndex = nPath.length - 1;
95
+ if (nPath[lastIndex] === "/") {
96
+ nPath = nPath.substring(0, lastIndex);
97
+ }
98
+ return res2 + nPath;
99
+ }, "");
100
+ return res || "/";
101
+ }
85
102
  function getAppInstance(options, appInfo, manifest) {
86
103
  let locationHref = "";
87
- class MicroApp extends import_react.default.Component {
88
- constructor() {
89
- super(...arguments);
90
- this.state = {
91
- appInstance: null,
92
- domId: (0, import_util.generateSubAppContainerKey)(appInfo),
93
- SubModuleComponent: void 0
94
- };
95
- this.unregisterHistoryListener = () => {
96
- };
104
+ function MicroApp(props) {
105
+ var _a, _b, _c, _d, _e, _f;
106
+ const appRef = (0, import_react.useRef)(null);
107
+ const domId = (0, import_util.generateSubAppContainerKey)(appInfo);
108
+ const [SubModuleComponent, setSubModuleComponent] = (0, import_react.useState)();
109
+ const context = (0, import_react.useContext)(import_runtime.RuntimeReactContext);
110
+ const match = (_b = (_a = context == null ? void 0 : context.router) == null ? void 0 : _a.useRouteMatch) == null ? void 0 : _b.call(_a);
111
+ const matchs = (_d = (_c = context == null ? void 0 : context.router) == null ? void 0 : _c.useMatches) == null ? void 0 : _d.call(_c);
112
+ const location = (_f = (_e = context == null ? void 0 : context.router) == null ? void 0 : _e.useLocation) == null ? void 0 : _f.call(_e);
113
+ let basename = (options == null ? void 0 : options.basename) || "/";
114
+ if (matchs && matchs.length > 0) {
115
+ basename = pathJoin(basename, matchs[matchs.length - 1].pathname || "/");
116
+ } else if (match) {
117
+ basename = pathJoin(basename, (match == null ? void 0 : match.path) || "/");
97
118
  }
98
- componentDidMount() {
99
- return __async(this, null, function* () {
100
- const _a = this.props, { match, history, setLoadingState } = _a, userProps = __objRest(_a, ["match", "history", "setLoadingState"]);
101
- const { domId } = this.state;
102
- const loadAppOptions = __spreadProps(__spreadValues({}, appInfo), {
103
- insulationVariable: [
104
- ...appInfo.insulationVariable || [],
105
- "_SERVER_DATA"
106
- ],
107
- domGetter: `#${domId}`,
108
- basename: import_path.default.join((options == null ? void 0 : options.basename) || "/", (match == null ? void 0 : match.path) || "/"),
109
- cache: true,
110
- props: __spreadValues(__spreadValues({}, appInfo.props), userProps),
111
- customLoader: (provider) => {
112
- const {
113
- render,
114
- destroy,
115
- SubModuleComponent,
116
- jupiter_submodule_app_key
117
- } = provider;
118
- const componetRenderMode = (manifest == null ? void 0 : manifest.componentRender) && (SubModuleComponent || jupiter_submodule_app_key);
119
- return {
120
- mount: (...props) => {
121
- if (componetRenderMode) {
122
- this.setState({
123
- SubModuleComponent: SubModuleComponent != null ? SubModuleComponent : jupiter_submodule_app_key
124
- });
125
- return void 0;
126
- } else {
127
- (0, import_util.logger)("MicroApp customer render", props);
128
- return render == null ? void 0 : render.apply(provider, props);
129
- }
130
- },
131
- unmount(...props) {
132
- if (componetRenderMode) {
133
- return void 0;
134
- }
135
- (0, import_util.logger)("MicroApp customer destroy", props);
136
- return destroy == null ? void 0 : destroy.apply(provider, props);
119
+ (0, import_react.useEffect)(() => {
120
+ if (location && locationHref !== location.pathname && !import_garfish.default.running) {
121
+ locationHref = location.pathname;
122
+ const popStateEvent = new PopStateEvent("popstate");
123
+ popStateEvent.garfish = true;
124
+ dispatchEvent(popStateEvent);
125
+ (0, import_util.logger)(`MicroApp Garfish.loadApp popstate`);
126
+ }
127
+ }, [location]);
128
+ (0, import_react.useEffect)(() => {
129
+ const _a2 = props, { setLoadingState } = _a2, userProps = __objRest(_a2, ["setLoadingState"]);
130
+ const loadAppOptions = __spreadProps(__spreadValues({}, appInfo), {
131
+ insulationVariable: [
132
+ ...appInfo.insulationVariable || [],
133
+ "_SERVER_DATA"
134
+ ],
135
+ domGetter: `#${domId}`,
136
+ basename,
137
+ cache: true,
138
+ props: __spreadValues(__spreadValues({}, appInfo.props), userProps),
139
+ customLoader: (provider) => {
140
+ const {
141
+ render,
142
+ destroy,
143
+ SubModuleComponent: SubModuleComponent2,
144
+ jupiter_submodule_app_key
145
+ } = provider;
146
+ const componetRenderMode = (manifest == null ? void 0 : manifest.componentRender) && (SubModuleComponent2 || jupiter_submodule_app_key);
147
+ return {
148
+ mount: (...props2) => {
149
+ if (componetRenderMode) {
150
+ setSubModuleComponent(SubModuleComponent2);
151
+ return void 0;
152
+ } else {
153
+ (0, import_util.logger)("MicroApp customer render", props2);
154
+ return render == null ? void 0 : render.apply(provider, props2);
137
155
  }
138
- };
139
- }
140
- });
141
- setLoadingState({
142
- isLoading: true,
143
- error: null
144
- });
145
- (0, import_util.logger)(`MicroApp Garfish.loadApp "${appInfo.name}"`, {
146
- loadAppOptions
147
- });
148
- try {
149
- const appInstance = yield import_garfish.default.loadApp(appInfo.name, loadAppOptions);
150
- if (!appInstance) {
151
- throw new Error(
152
- `MicroApp Garfish.loadApp "${appInfo.name}" result is null`
156
+ },
157
+ unmount(...props2) {
158
+ if (componetRenderMode) {
159
+ return void 0;
160
+ }
161
+ (0, import_util.logger)("MicroApp customer destroy", props2);
162
+ return destroy == null ? void 0 : destroy.apply(provider, props2);
163
+ }
164
+ };
165
+ }
166
+ });
167
+ setLoadingState({
168
+ isLoading: true,
169
+ error: null
170
+ });
171
+ (0, import_util.logger)(`MicroApp Garfish.loadApp "${appInfo.name}"`, {
172
+ loadAppOptions
173
+ });
174
+ function renderApp() {
175
+ return __async(this, null, function* () {
176
+ try {
177
+ const appInstance = yield import_garfish.default.loadApp(
178
+ appInfo.name,
179
+ loadAppOptions
153
180
  );
154
- }
155
- this.setState({
156
- appInstance
157
- });
158
- setLoadingState({
159
- isLoading: false
160
- });
161
- if (appInstance.mounted && appInstance.appInfo.cache) {
162
- (0, import_util.logger)(`MicroApp Garfish.loadApp "${appInfo.name}" show`, {
163
- appInfo: appInstance.appInfo,
164
- appInstance
181
+ if (!appInstance) {
182
+ throw new Error(
183
+ `MicroApp Garfish.loadApp "${appInfo.name}" result is null`
184
+ );
185
+ }
186
+ appRef.current = appInstance;
187
+ setLoadingState({
188
+ isLoading: false
165
189
  });
166
- yield appInstance == null ? void 0 : appInstance.show();
167
- } else {
168
- (0, import_util.logger)(`MicroApp Garfish.loadApp "${appInfo.name}" mount`, {
169
- appInfo: appInstance.appInfo,
170
- appInstance
190
+ if (appInstance.mounted && appInstance.appInfo.cache) {
191
+ (0, import_util.logger)(`MicroApp Garfish.loadApp "${appInfo.name}" show`, {
192
+ appInfo: appInstance.appInfo,
193
+ appInstance
194
+ });
195
+ yield appInstance == null ? void 0 : appInstance.show();
196
+ } else {
197
+ (0, import_util.logger)(`MicroApp Garfish.loadApp "${appInfo.name}" mount`, {
198
+ appInfo: appInstance.appInfo,
199
+ appInstance
200
+ });
201
+ yield appInstance == null ? void 0 : appInstance.mount();
202
+ }
203
+ } catch (error) {
204
+ setLoadingState({
205
+ isLoading: true,
206
+ error
171
207
  });
172
- yield appInstance == null ? void 0 : appInstance.mount();
173
208
  }
174
- this.unregisterHistoryListener = history == null ? void 0 : history.listen(() => {
175
- if (locationHref !== history.location.pathname) {
176
- locationHref = history.location.pathname;
177
- const popStateEvent = new PopStateEvent("popstate");
178
- dispatchEvent(popStateEvent);
179
- (0, import_util.logger)(`MicroApp Garfish.loadApp popstate`);
180
- }
181
- });
182
- } catch (error) {
183
- setLoadingState({
184
- isLoading: true,
185
- error
186
- });
187
- }
188
- });
189
- }
190
- componentWillUnmount() {
191
- return __async(this, null, function* () {
192
- var _a;
193
- const { appInstance } = this.state;
194
- (_a = this.unregisterHistoryListener) == null ? void 0 : _a.call(this);
195
- if (appInstance) {
196
- const { appInfo: appInfo2 } = appInstance;
209
+ });
210
+ }
211
+ renderApp();
212
+ return () => {
213
+ var _a3, _b2;
214
+ if (appRef.current) {
215
+ const { appInfo: appInfo2 } = appRef.current;
197
216
  if (appInfo2.cache) {
198
217
  (0, import_util.logger)(`MicroApp Garfish.loadApp "${appInfo2.name}" hide`);
199
- appInstance == null ? void 0 : appInstance.hide();
218
+ (_a3 = appRef.current) == null ? void 0 : _a3.hide();
200
219
  } else {
201
220
  (0, import_util.logger)(`MicroApp Garfish.loadApp "${appInfo2.name}" unmount`);
202
- appInstance == null ? void 0 : appInstance.unmount();
221
+ (_b2 = appRef.current) == null ? void 0 : _b2.unmount();
203
222
  }
204
223
  }
205
- });
206
- }
207
- render() {
208
- const { domId, SubModuleComponent } = this.state;
209
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
210
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
211
- id: domId,
212
- children: SubModuleComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SubModuleComponent, {})
213
- })
214
- });
215
- }
224
+ };
225
+ }, []);
226
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
227
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
228
+ id: domId,
229
+ children: SubModuleComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SubModuleComponent, {})
230
+ })
231
+ });
216
232
  }
217
- return (0, import_loadable.Loadable)((0, import_runtime.withRouter)(MicroApp))(
218
- manifest == null ? void 0 : manifest.loadable
219
- );
233
+ return (0, import_loadable.Loadable)(MicroApp)(manifest == null ? void 0 : manifest.loadable);
220
234
  }
221
235
  function generateApps(options, manifest) {
222
236
  var _a;
@@ -230,5 +244,6 @@ function generateApps(options, manifest) {
230
244
  }
231
245
  // Annotate the CommonJS export names for ESM import in node:
232
246
  0 && (module.exports = {
233
- generateApps
247
+ generateApps,
248
+ pathJoin
234
249
  });
@@ -150,11 +150,9 @@ var __generator = this && this.__generator || function(thisArg, body) {
150
150
  };
151
151
  }
152
152
  };
153
- import path from "path";
154
153
  import { createRuntimeExportsUtils, PLUGIN_SCHEMAS } from "@modern-js/utils";
155
154
  import { logger } from "../util";
156
155
  import { getRuntimeConfig, makeProvider, makeRenderFunction, setRuntimeConfig, generateAsyncEntry } from "./utils";
157
- import "./types";
158
156
  var externals = {
159
157
  "react-dom": "react-dom",
160
158
  react: "react"
@@ -173,13 +171,12 @@ function getDefaultMicroFrontedConfig(microFrontend) {
173
171
  }, microFrontend);
174
172
  }
175
173
  var cli_default = function() {
176
- var ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _pluginName = ref.pluginName, pluginName = _pluginName === void 0 ? "@modern-js/plugin-garfish" : _pluginName, _runtimePluginName = ref.runtimePluginName, runtimePluginName = _runtimePluginName === void 0 ? "@modern-js/runtime/plugins" : _runtimePluginName, _mfPackagePath = ref.mfPackagePath, mfPackagePath = _mfPackagePath === void 0 ? path.resolve(__dirname, "../../../../") : _mfPackagePath;
174
+ var ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _pluginName = ref.pluginName, pluginName = _pluginName === void 0 ? "@modern-js/plugin-garfish" : _pluginName, _runtimePluginName = ref.runtimePluginName, runtimePluginName = _runtimePluginName === void 0 ? "@modern-js/runtime/plugins" : _runtimePluginName;
177
175
  return {
178
176
  name: "@modern-js/plugin-garfish",
179
177
  setup: function(param) {
180
178
  var useAppContext = param.useAppContext, useResolvedConfigContext = param.useResolvedConfigContext, useConfigContext = param.useConfigContext;
181
179
  var pluginsExportsUtils;
182
- var runtimeExportsUtils;
183
180
  return {
184
181
  validateSchema: function validateSchema() {
185
182
  return PLUGIN_SCHEMAS["@modern-js/plugin-garfish"];
@@ -221,7 +218,6 @@ var cli_default = function() {
221
218
  logger("useConfig", useConfig);
222
219
  var config = useAppContext();
223
220
  pluginsExportsUtils = createRuntimeExportsUtils(config.internalDirectory, "plugins");
224
- runtimeExportsUtils = createRuntimeExportsUtils(config.internalDirectory, "index");
225
221
  var disableCssExtract = ((ref = useConfig.output) === null || ref === void 0 ? void 0 : ref.disableCssExtract) || false;
226
222
  if ((ref1 = useConfig.deploy) === null || ref1 === void 0 ? void 0 : ref1.microFrontend) {
227
223
  var ref2;
@@ -237,7 +233,7 @@ var cli_default = function() {
237
233
  source: {
238
234
  alias: {
239
235
  "@modern-js/runtime/plugins": pluginsExportsUtils.getPath(),
240
- "@modern-js/runtime/garfish": mfPackagePath
236
+ "@modern-js/runtime/garfish": "@modern-js/plugin-garfish/runtime"
241
237
  }
242
238
  },
243
239
  tools: {
@@ -251,9 +247,9 @@ var cli_default = function() {
251
247
  var ref, ref1;
252
248
  var resolveOptions = useResolvedConfigContext();
253
249
  if (resolveOptions === null || resolveOptions === void 0 ? void 0 : (ref = resolveOptions.deploy) === null || ref === void 0 ? void 0 : ref.microFrontend) {
254
- var ref2, ref3;
250
+ var ref2, ref3, ref4;
255
251
  chain.output.libraryTarget("umd");
256
- if ((resolveOptions === null || resolveOptions === void 0 ? void 0 : (ref2 = resolveOptions.server) === null || ref2 === void 0 ? void 0 : ref2.port) && env === "development") {
252
+ if (!((ref2 = useConfig.dev) === null || ref2 === void 0 ? void 0 : ref2.assetPrefix) && (resolveOptions === null || resolveOptions === void 0 ? void 0 : (ref3 = resolveOptions.server) === null || ref3 === void 0 ? void 0 : ref3.port) && env === "development") {
257
253
  chain.output.publicPath("//localhost:".concat(resolveOptions.server.port, "/"));
258
254
  }
259
255
  if (webpack.BannerPlugin) {
@@ -263,7 +259,7 @@ var cli_default = function() {
263
259
  }
264
260
  ]);
265
261
  }
266
- var ref4 = getDefaultMicroFrontedConfig((ref3 = resolveOptions.deploy) === null || ref3 === void 0 ? void 0 : ref3.microFrontend), enableHtmlEntry = ref4.enableHtmlEntry, externalBasicLibrary = ref4.externalBasicLibrary;
262
+ var ref5 = getDefaultMicroFrontedConfig((ref4 = resolveOptions.deploy) === null || ref4 === void 0 ? void 0 : ref4.microFrontend), enableHtmlEntry = ref5.enableHtmlEntry, externalBasicLibrary = ref5.externalBasicLibrary;
267
263
  if (externalBasicLibrary) {
268
264
  chain.externals(externals);
269
265
  }
@@ -292,7 +288,6 @@ var cli_default = function() {
292
288
  var addExportStatement = "export { default as garfish, default as masterApp, hoistNonReactStatics } from '".concat(pluginName, "/runtime'");
293
289
  logger("exportStatement", addExportStatement);
294
290
  pluginsExportsUtils.addExport(addExportStatement);
295
- runtimeExportsUtils.addExport("export * from '".concat(mfPackagePath, "/runtime'"));
296
291
  },
297
292
  modifyEntryImports: function modifyEntryImports(param) {
298
293
  var entrypoint = param.entrypoint, imports = param.imports;
@@ -1,9 +1,9 @@
1
1
  var makeProvider = function() {
2
- return "\nexport const provider = function ({basename, dom}) {\n return {\n render({basename, dom, props, appName}) {\n render({ props, basename, dom, appName });\n },\n destroy({ dom }) {\n const node = dom.querySelector('#' + MOUNT_ID) || dom;\n\n if (node) {\n if (IS_REACT18) {\n root.unmount();\n } else {\n unmountComponentAtNode(node);\n }\n }\n },\n SubModuleComponent: (props) => {\n const SubApp = render({props, basename});\n\n return createPortal(<SubApp />, dom.querySelector('#' + MOUNT_ID) || dom);\n },\n jupiter_submodule_app_key: (props) => {\n const SubApp = render({props, basename});\n\n return createPortal(<SubApp />, dom.querySelector('#' + MOUNT_ID) || dom);\n }\n }\n};\n\nif (typeof __GARFISH_EXPORTS__ !== 'undefined') {\n __GARFISH_EXPORTS__.provider = provider;\n}\n\nfunction canContinueRender ({ dom, appName }) {\n var renderByGarfish =\n typeof __GARFISH_EXPORTS__ !== 'undefined'\n || typeof window !== 'undefined' && window.Garfish && window.Garfish.activeApps && window.Garfish.activeApps.some((app)=>app.appInfo.name === appName);\n let renderByProvider = dom || appName;\n if (renderByGarfish) {\n // Runs in the Garfish environment and is rendered by the provider\n if (renderByProvider) {\n return true;\n } else {\n // Runs in the Garfish environment and is not rendered by the provider\n return false;\n }\n } else {\n // Running in a non-Garfish environment\n return true;\n }\n}\n\nfunction generateRouterPlugin (basename,routerConfig) {\n if (basename) {\n routerConfig.basename = basename;\n if (routerConfig.supportHtml5History !== false) {\n if (!routerConfig.historyOptions) {\n routerConfig.historyOptions = {\n basename: basename\n };\n } else {\n routerConfig.historyOptions.basename = basename;\n }\n }\n }\n return router(routerConfig);\n}\n\nfunction generateAppWrapperAndRootDom ({ App, props, dom }) {\n let AppWrapper = App;\n if (props) {\n AppWrapper = function () {\n return React.createElement(App, props);\n };\n AppWrapper = hoistNonReactStatics(AppWrapper, App);\n }\n const mountNode = dom ? (dom.querySelector('#' + MOUNT_ID) || dom) : document.getElementById(MOUNT_ID);\n return { AppWrapper, mountNode }\n}\n";
2
+ return "\nexport const provider = function ({basename, dom}) {\n return {\n render({basename, dom, props, appName}) {\n render({ props, basename, dom, appName });\n },\n destroy({ dom }) {\n const node = dom.querySelector('#' + MOUNT_ID) || dom;\n\n if (node) {\n if (IS_REACT18) {\n root.unmount();\n } else {\n unmountComponentAtNode(node);\n }\n }\n },\n SubModuleComponent: (props) => {\n const SubApp = render({props, basename});\n\n return createPortal(<SubApp />, dom.querySelector('#' + MOUNT_ID) || dom);\n },\n jupiter_submodule_app_key: (props) => {\n const SubApp = render({props, basename});\n\n return createPortal(<SubApp />, dom.querySelector('#' + MOUNT_ID) || dom);\n }\n }\n};\n\nif (typeof __GARFISH_EXPORTS__ !== 'undefined') {\n __GARFISH_EXPORTS__.provider = provider;\n}\n\nfunction canContinueRender ({ dom, appName }) {\n var renderByGarfish =\n typeof __GARFISH_EXPORTS__ !== 'undefined'\n || typeof window !== 'undefined' && window.Garfish && window.Garfish.activeApps && window.Garfish.activeApps.some((app)=>app.appInfo.name === appName);\n let renderByProvider = dom || appName;\n if (renderByGarfish) {\n // Runs in the Garfish environment and is rendered by the provider\n if (renderByProvider) {\n return true;\n } else {\n // Runs in the Garfish environment and is not rendered by the provider\n return false;\n }\n } else {\n // Running in a non-Garfish environment\n return true;\n }\n}\n\nfunction generateRouterPlugin (basename,routerConfig) {\n if (basename) {\n routerConfig.basename = basename;\n if (routerConfig.supportHtml5History !== false) {\n if (!routerConfig.historyOptions) {\n routerConfig.historyOptions = {\n basename: basename\n };\n } else {\n routerConfig.historyOptions.basename = basename;\n }\n }\n }\n return router(routerConfig);\n}\n\nfunction generateAppWrapperAndRootDom ({ App, props: garfishProps, dom }) {\n let AppWrapper = App;\n if (garfishProps) {\n AppWrapper = function (props) {\n return React.createElement(App, { ...garfishProps, ...props });\n };\n AppWrapper = hoistNonReactStatics(AppWrapper, App);\n }\n const mountNode = dom ? (dom.querySelector('#' + MOUNT_ID) || dom) : document.getElementById(MOUNT_ID);\n return { AppWrapper, mountNode }\n}\n";
3
3
  };
4
4
  var makeRenderFunction = function(code) {
5
5
  var inGarfishToRender = "\n const { basename, props, dom, appName } = typeof arguments[0] === 'object' && arguments[0] || {};\n if (!canContinueRender({ dom, appName })) return null;\n let { AppWrapper, mountNode } = generateAppWrapperAndRootDom({App, props, dom});\n ";
6
- return inGarfishToRender + code.replace("router(", "generateRouterPlugin(basename,").replace("(App)", "(AppWrapper)").replace(/MOUNT_ID/g, "mountNode").replace("bootstrap(AppWrapper, mountNode, root", "bootstrap(AppWrapper, mountNode, root = IS_REACT18 ? ReactDOM.createRoot(mountNode) : null");
6
+ return inGarfishToRender + code.replace("router(", "generateRouterPlugin(basename,").replace("(App)", "(AppWrapper)").replace(/MOUNT_ID/g, "mountNode").replace("bootstrap(AppWrapper, mountNode, root", "bootstrap(AppWrapper, mountNode, root = IS_REACT18 ? ReactDOM.createRoot(mountNode) : null").replace("customBootstrap(AppWrapper)", "customBootstrap(AppWrapper, mountNode)");
7
7
  };
8
8
  function getRuntimeConfig(config) {
9
9
  var ref;
@@ -461,7 +461,7 @@ var plugin_default = function(config) {
461
461
  logger("GarfishProvider state", this.state);
462
462
  return /* @__PURE__ */ jsx(GarfishProvider, {
463
463
  value: this.state,
464
- children: /* @__PURE__ */ jsx(App, _objectSpread({}, this.props, this.state))
464
+ children: /* @__PURE__ */ jsx(App, _objectSpread({}, this.props))
465
465
  });
466
466
  }
467
467
  }