@modern-js/plugin-garfish 2.4.0 → 2.5.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/{js/node → cjs}/cli/index.js +10 -41
  3. package/dist/{js/node → cjs}/cli/utils.js +5 -2
  4. package/dist/{js/node → cjs}/deps/index.js +0 -0
  5. package/dist/{js/node → cjs}/index.js +0 -0
  6. package/dist/{js/node → cjs}/runtime/index.js +0 -0
  7. package/dist/{js/node → cjs}/runtime/loadable.js +11 -38
  8. package/dist/{js/node → cjs}/runtime/plugin.js +32 -79
  9. package/dist/{js/node → cjs}/runtime/useModuleApps.js +8 -20
  10. package/dist/{js/node → cjs}/runtime/utils/Context.js +0 -0
  11. package/dist/{js/node → cjs}/runtime/utils/MApp.js +4 -30
  12. package/dist/{js/node → cjs}/runtime/utils/apps.js +43 -88
  13. package/dist/{js/node → cjs}/runtime/utils/setExternal.js +0 -0
  14. package/dist/{js/node → cjs}/util.js +0 -0
  15. package/dist/{js/treeshaking → esm}/cli/index.js +22 -22
  16. package/dist/{js/treeshaking → esm}/cli/utils.js +8 -8
  17. package/dist/{js/treeshaking → esm}/deps/index.js +0 -0
  18. package/dist/{js/treeshaking → esm}/index.js +0 -0
  19. package/dist/{js/treeshaking → esm}/runtime/index.js +0 -0
  20. package/dist/{js/treeshaking → esm}/runtime/loadable.js +5 -5
  21. package/dist/{js/treeshaking → esm}/runtime/plugin.js +7 -7
  22. package/dist/{js/treeshaking → esm}/runtime/useModuleApps.js +1 -1
  23. package/dist/{js/treeshaking → esm}/runtime/utils/Context.js +0 -0
  24. package/dist/{js/treeshaking → esm}/runtime/utils/MApp.js +3 -3
  25. package/dist/{js/treeshaking → esm}/runtime/utils/apps.js +12 -12
  26. package/dist/{js/treeshaking → esm}/runtime/utils/setExternal.js +0 -0
  27. package/dist/{js/treeshaking → esm}/util.js +0 -0
  28. package/dist/{js/modern → esm-node}/cli/index.js +10 -43
  29. package/dist/{js/modern → esm-node}/cli/utils.js +5 -2
  30. package/dist/{js/modern → esm-node}/deps/index.js +0 -0
  31. package/dist/{js/modern → esm-node}/index.js +0 -0
  32. package/dist/{js/modern → esm-node}/runtime/index.js +0 -0
  33. package/dist/{js/modern → esm-node}/runtime/loadable.js +11 -40
  34. package/dist/esm-node/runtime/plugin.js +107 -0
  35. package/dist/esm-node/runtime/useModuleApps.js +36 -0
  36. package/dist/{js/modern → esm-node}/runtime/utils/Context.js +0 -0
  37. package/dist/{js/modern → esm-node}/runtime/utils/MApp.js +4 -32
  38. package/dist/{js/modern → esm-node}/runtime/utils/apps.js +43 -90
  39. package/dist/{js/modern → esm-node}/runtime/utils/setExternal.js +0 -0
  40. package/dist/{js/modern → esm-node}/util.js +0 -0
  41. package/package.json +16 -17
  42. package/dist/js/modern/runtime/plugin.js +0 -156
  43. package/dist/js/modern/runtime/useModuleApps.js +0 -50
@@ -89,8 +89,8 @@ const makeRenderFunction = (code) => {
89
89
  `bootstrap(AppWrapper, mountNode, root`,
90
90
  "bootstrap(AppWrapper, mountNode, root = IS_REACT18 ? ReactDOM.createRoot(mountNode) : null"
91
91
  ).replace(
92
- `customBootstrap(AppWrapper)`,
93
- "customBootstrap(AppWrapper, mountNode)"
92
+ `customBootstrap(AppWrapper`,
93
+ "customBootstrap(AppWrapper, mountNode"
94
94
  );
95
95
  };
96
96
  function getRuntimeConfig(config) {
@@ -123,6 +123,9 @@ const generateAsyncEntry = (code) => {
123
123
  return exports.provider.apply(null, args);
124
124
  };
125
125
  ${transformCode}
126
+ if (typeof __GARFISH_EXPORTS__ !== 'undefined') {
127
+ __GARFISH_EXPORTS__.provider = provider;
128
+ }
126
129
  `;
127
130
  };
128
131
  export {
File without changes
File without changes
File without changes
@@ -1,34 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __objRest = (source, exclude) => {
21
- var target = {};
22
- for (var prop in source)
23
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
- target[prop] = source[prop];
25
- if (source != null && __getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(source)) {
27
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
- target[prop] = source[prop];
29
- }
30
- return target;
31
- };
32
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
33
2
  import { useState, useEffect, useCallback } from "react";
34
3
  import { logger } from "../util";
@@ -40,8 +9,8 @@ const DEFAULT_LOADABLE = {
40
9
  function Loadable(WrapComponent) {
41
10
  return function(defaultLoadable) {
42
11
  return function Lodable(props) {
43
- var _b;
44
- const _a = props, { loadable = defaultLoadable != null ? defaultLoadable : DEFAULT_LOADABLE } = _a, otherProps = __objRest(_a, ["loadable"]);
12
+ var _a;
13
+ const { loadable = defaultLoadable != null ? defaultLoadable : DEFAULT_LOADABLE, ...otherProps } = props;
45
14
  let delayTimer = null;
46
15
  let timeoutTimer = null;
47
16
  const [state, setState] = useState(() => {
@@ -68,7 +37,7 @@ function Loadable(WrapComponent) {
68
37
  }
69
38
  return initState;
70
39
  });
71
- const LoadingComponent = (_b = props.loadable) == null ? void 0 : _b.loading;
40
+ const LoadingComponent = (_a = props.loadable) == null ? void 0 : _a.loading;
72
41
  useEffect(() => {
73
42
  logger("Loadable render state", {
74
43
  state,
@@ -92,15 +61,16 @@ function Loadable(WrapComponent) {
92
61
  };
93
62
  }, []);
94
63
  const retry = useCallback(() => {
95
- setState(__spreadProps(__spreadValues({}, state), {
64
+ setState({
65
+ ...state,
96
66
  error: null,
97
67
  isLoading: true,
98
68
  timedOut: false
99
- }));
69
+ });
100
70
  }, [state]);
101
71
  const setStateWithMountCheck = useCallback(
102
72
  (newState) => {
103
- setState((state2) => __spreadValues(__spreadValues({}, state2), newState));
73
+ setState((state2) => ({ ...state2, ...newState }));
104
74
  },
105
75
  [state]
106
76
  );
@@ -114,15 +84,16 @@ function Loadable(WrapComponent) {
114
84
  error: state == null ? void 0 : state.error,
115
85
  retry
116
86
  }),
117
- /* @__PURE__ */ jsx(WrapComponent, __spreadValues({
87
+ /* @__PURE__ */ jsx(WrapComponent, {
118
88
  style: { display: showLoading ? "none" : "block" },
119
89
  setLoadingState: (props2) => {
120
90
  if (props2.error && !LoadingComponent) {
121
91
  throw props2.error;
122
92
  }
123
93
  setStateWithMountCheck(props2);
124
- }
125
- }, otherProps))
94
+ },
95
+ ...otherProps
96
+ })
126
97
  ]
127
98
  });
128
99
  };
@@ -0,0 +1,107 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import GarfishInstance from "garfish";
3
+ import React from "react";
4
+ import hoistNonReactStatics from "hoist-non-react-statics";
5
+ import { logger } from "../util";
6
+ import { GarfishProvider } from "./utils/Context";
7
+ import setExternal from "./utils/setExternal";
8
+ import { generateMApp } from "./utils/MApp";
9
+ import { generateApps } from "./utils/apps";
10
+ async function initOptions(manifest = {}, options) {
11
+ var _a, _b, _c;
12
+ let apps = options.apps || [];
13
+ if (manifest == null ? void 0 : manifest.modules) {
14
+ if ((manifest == null ? void 0 : manifest.modules.length) > 0) {
15
+ apps = manifest == null ? void 0 : manifest.modules;
16
+ }
17
+ logger("manifest modules", apps);
18
+ }
19
+ if (manifest == null ? void 0 : manifest.getAppList) {
20
+ const getAppList = await (manifest == null ? void 0 : manifest.getAppList(manifest));
21
+ if (getAppList.length > 0) {
22
+ apps = getAppList;
23
+ }
24
+ logger("getAppList modules", apps);
25
+ }
26
+ if (((_a = window == null ? void 0 : window.modern_manifest) == null ? void 0 : _a.modules) && ((_b = window == null ? void 0 : window.modern_manifest) == null ? void 0 : _b.modules.length) > 0) {
27
+ apps = (_c = window == null ? void 0 : window.modern_manifest) == null ? void 0 : _c.modules;
28
+ logger("modern_manifest", apps);
29
+ }
30
+ return {
31
+ ...options,
32
+ apps
33
+ };
34
+ }
35
+ var plugin_default = (config) => ({
36
+ name: "@modern-js/garfish-plugin",
37
+ setup: () => {
38
+ setExternal();
39
+ const { manifest, ...options } = config;
40
+ logger("createPlugin", config);
41
+ const promise = initOptions(manifest, options);
42
+ return {
43
+ hoc({ App }, next) {
44
+ class GetMicroFrontendApp extends React.Component {
45
+ constructor(props) {
46
+ super(props);
47
+ this.state = {
48
+ MApp: () => {
49
+ logger("MApp init Component Render");
50
+ return React.createElement("div");
51
+ },
52
+ apps: new Proxy(
53
+ {},
54
+ {
55
+ get() {
56
+ return () => React.createElement("div");
57
+ }
58
+ }
59
+ ),
60
+ appInfoList: []
61
+ };
62
+ const load = async () => {
63
+ GarfishInstance.setOptions({
64
+ ...options,
65
+ insulationVariable: [
66
+ ...options.insulationVariable || [],
67
+ "_SERVER_DATA"
68
+ ],
69
+ apps: []
70
+ });
71
+ const GarfishConfig = await promise;
72
+ const { appInfoList, apps } = generateApps(
73
+ GarfishConfig,
74
+ manifest
75
+ );
76
+ GarfishInstance.registerApp(appInfoList);
77
+ const MApp = generateMApp(GarfishConfig, manifest);
78
+ logger("initOptions result", { manifest, GarfishConfig });
79
+ logger("generateApps", { MApp, apps, appInfoList });
80
+ this.setState({
81
+ MApp,
82
+ apps,
83
+ appInfoList
84
+ });
85
+ };
86
+ load();
87
+ }
88
+ render() {
89
+ logger("GarfishProvider state", this.state);
90
+ return /* @__PURE__ */ jsx(GarfishProvider, {
91
+ value: this.state,
92
+ children: /* @__PURE__ */ jsx(App, {
93
+ ...this.props
94
+ })
95
+ });
96
+ }
97
+ }
98
+ return next({
99
+ App: hoistNonReactStatics(GetMicroFrontendApp, App)
100
+ });
101
+ }
102
+ };
103
+ }
104
+ });
105
+ export {
106
+ plugin_default as default
107
+ };
@@ -0,0 +1,36 @@
1
+ import React, { useContext } from "react";
2
+ import { logger } from "../util";
3
+ import { GarfishContext } from "./utils/Context";
4
+ function useModuleApps() {
5
+ const { apps, MApp, appInfoList } = useContext(GarfishContext);
6
+ logger("call useModuleApps", {
7
+ MApp,
8
+ apps: appInfoList,
9
+ ...apps
10
+ });
11
+ const Info = new Proxy(
12
+ {
13
+ MApp,
14
+ apps: appInfoList,
15
+ ...apps
16
+ },
17
+ {
18
+ get(target, p, receiver) {
19
+ if (typeof p === "string" && p in target) {
20
+ return Reflect.get(target, p, receiver);
21
+ }
22
+ return () => React.createElement("div");
23
+ }
24
+ }
25
+ );
26
+ return Info;
27
+ }
28
+ function useModuleApp() {
29
+ const { MApp } = useContext(GarfishContext);
30
+ logger("call useModuleApps", MApp);
31
+ return MApp;
32
+ }
33
+ export {
34
+ useModuleApp,
35
+ useModuleApps
36
+ };
@@ -1,31 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
- var __hasOwnProp = Object.prototype.hasOwnProperty;
4
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __spreadValues = (a, b) => {
7
- for (var prop in b || (b = {}))
8
- if (__hasOwnProp.call(b, prop))
9
- __defNormalProp(a, prop, b[prop]);
10
- if (__getOwnPropSymbols)
11
- for (var prop of __getOwnPropSymbols(b)) {
12
- if (__propIsEnum.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- }
15
- return a;
16
- };
17
- var __objRest = (source, exclude) => {
18
- var target = {};
19
- for (var prop in source)
20
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
21
- target[prop] = source[prop];
22
- if (source != null && __getOwnPropSymbols)
23
- for (var prop of __getOwnPropSymbols(source)) {
24
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
25
- target[prop] = source[prop];
26
- }
27
- return target;
28
- };
29
1
  import { jsx } from "react/jsx-runtime";
30
2
  import React from "react";
31
3
  import Garfish from "garfish";
@@ -109,7 +81,7 @@ function generateMApp(options, manifest) {
109
81
  return {
110
82
  mount: (appInfo) => {
111
83
  const transferProps = this.filterTransferProps();
112
- appInfo.props = __spreadValues(__spreadValues({}, appInfo.props), transferProps);
84
+ appInfo.props = { ...appInfo.props, ...transferProps };
113
85
  if (componetRenderMode) {
114
86
  this.setState({
115
87
  SubModuleComponent: SubModuleComponent != null ? SubModuleComponent : jupiter_submodule_app_key
@@ -122,7 +94,7 @@ function generateMApp(options, manifest) {
122
94
  },
123
95
  unmount: (appInfo) => {
124
96
  const transferProps = this.filterTransferProps();
125
- appInfo.props = __spreadValues(__spreadValues({}, appInfo.props), transferProps);
97
+ appInfo.props = { ...appInfo.props, ...transferProps };
126
98
  if (componetRenderMode) {
127
99
  return void 0;
128
100
  }
@@ -145,14 +117,14 @@ function generateMApp(options, manifest) {
145
117
  logger("MApp componentWillUnmount");
146
118
  }
147
119
  filterTransferProps() {
148
- const _a = this.props, { style, setLoadingState } = _a, others = __objRest(_a, ["style", "setLoadingState"]);
120
+ const { style, setLoadingState, ...others } = this.props;
149
121
  return others;
150
122
  }
151
123
  render() {
152
124
  const { style } = this.props;
153
125
  const { SubModuleComponent } = this.state;
154
126
  return /* @__PURE__ */ jsx("div", {
155
- style: __spreadValues({}, style),
127
+ style: { ...style },
156
128
  id: generateSubAppContainerKey(),
157
129
  children: SubModuleComponent && /* @__PURE__ */ jsx(SubModuleComponent, {})
158
130
  });
@@ -1,54 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __objRest = (source, exclude) => {
21
- var target = {};
22
- for (var prop in source)
23
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
- target[prop] = source[prop];
25
- if (source != null && __getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(source)) {
27
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
- target[prop] = source[prop];
29
- }
30
- return target;
31
- };
32
- var __async = (__this, __arguments, generator) => {
33
- return new Promise((resolve, reject) => {
34
- var fulfilled = (value) => {
35
- try {
36
- step(generator.next(value));
37
- } catch (e) {
38
- reject(e);
39
- }
40
- };
41
- var rejected = (value) => {
42
- try {
43
- step(generator.throw(value));
44
- } catch (e) {
45
- reject(e);
46
- }
47
- };
48
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
49
- step((generator = generator.apply(__this, __arguments)).next());
50
- });
51
- };
52
1
  import { Fragment, jsx } from "react/jsx-runtime";
53
2
  import { useContext, useState, useEffect, useRef } from "react";
54
3
  import { RuntimeReactContext } from "@modern-js/runtime";
@@ -85,7 +34,9 @@ function getAppInstance(options, appInfo, manifest) {
85
34
  const location = (_f = (_e = context == null ? void 0 : context.router) == null ? void 0 : _e.useLocation) == null ? void 0 : _f.call(_e);
86
35
  let basename = (options == null ? void 0 : options.basename) || "/";
87
36
  if (matchs && matchs.length > 0) {
88
- const matchItem = __spreadValues({}, matchs[matchs.length - 1]);
37
+ const matchItem = {
38
+ ...matchs[matchs.length - 1]
39
+ };
89
40
  for (const key in matchItem.params) {
90
41
  matchItem.pathname = matchItem.pathname.replace(
91
42
  new RegExp(`/${matchItem.params[key]}$`),
@@ -106,8 +57,9 @@ function getAppInstance(options, appInfo, manifest) {
106
57
  }
107
58
  }, [location]);
108
59
  useEffect(() => {
109
- const _a2 = props, { setLoadingState } = _a2, userProps = __objRest(_a2, ["setLoadingState"]);
110
- const loadAppOptions = __spreadProps(__spreadValues({}, appInfo), {
60
+ const { setLoadingState, ...userProps } = props;
61
+ const loadAppOptions = {
62
+ ...appInfo,
111
63
  insulationVariable: [
112
64
  ...appInfo.insulationVariable || [],
113
65
  "_SERVER_DATA"
@@ -115,7 +67,10 @@ function getAppInstance(options, appInfo, manifest) {
115
67
  domGetter: `#${domId}`,
116
68
  basename,
117
69
  cache: true,
118
- props: __spreadValues(__spreadValues({}, appInfo.props), userProps),
70
+ props: {
71
+ ...appInfo.props,
72
+ ...userProps
73
+ },
119
74
  customLoader: (provider) => {
120
75
  const {
121
76
  render,
@@ -143,7 +98,7 @@ function getAppInstance(options, appInfo, manifest) {
143
98
  }
144
99
  };
145
100
  }
146
- });
101
+ };
147
102
  setLoadingState({
148
103
  isLoading: true,
149
104
  error: null
@@ -151,51 +106,49 @@ function getAppInstance(options, appInfo, manifest) {
151
106
  logger(`MicroApp Garfish.loadApp "${appInfo.name}"`, {
152
107
  loadAppOptions
153
108
  });
154
- function renderApp() {
155
- return __async(this, null, function* () {
156
- try {
157
- const appInstance = yield Garfish.loadApp(
158
- appInfo.name,
159
- loadAppOptions
109
+ async function renderApp() {
110
+ try {
111
+ const appInstance = await Garfish.loadApp(
112
+ appInfo.name,
113
+ loadAppOptions
114
+ );
115
+ if (!appInstance) {
116
+ throw new Error(
117
+ `MicroApp Garfish.loadApp "${appInfo.name}" result is null`
160
118
  );
161
- if (!appInstance) {
162
- throw new Error(
163
- `MicroApp Garfish.loadApp "${appInfo.name}" result is null`
164
- );
165
- }
166
- appRef.current = appInstance;
167
- setLoadingState({
168
- isLoading: false
119
+ }
120
+ appRef.current = appInstance;
121
+ setLoadingState({
122
+ isLoading: false
123
+ });
124
+ if (appInstance.mounted && appInstance.appInfo.cache) {
125
+ logger(`MicroApp Garfish.loadApp "${appInfo.name}" show`, {
126
+ appInfo: appInstance.appInfo,
127
+ appInstance
169
128
  });
170
- if (appInstance.mounted && appInstance.appInfo.cache) {
171
- logger(`MicroApp Garfish.loadApp "${appInfo.name}" show`, {
172
- appInfo: appInstance.appInfo,
173
- appInstance
174
- });
175
- yield appInstance == null ? void 0 : appInstance.show();
176
- } else {
177
- logger(`MicroApp Garfish.loadApp "${appInfo.name}" mount`, {
178
- appInfo: appInstance.appInfo,
179
- appInstance
180
- });
181
- yield appInstance == null ? void 0 : appInstance.mount();
182
- }
183
- } catch (error) {
184
- setLoadingState({
185
- isLoading: true,
186
- error
129
+ await (appInstance == null ? void 0 : appInstance.show());
130
+ } else {
131
+ logger(`MicroApp Garfish.loadApp "${appInfo.name}" mount`, {
132
+ appInfo: appInstance.appInfo,
133
+ appInstance
187
134
  });
135
+ await (appInstance == null ? void 0 : appInstance.mount());
188
136
  }
189
- });
137
+ } catch (error) {
138
+ setLoadingState({
139
+ isLoading: true,
140
+ error
141
+ });
142
+ }
190
143
  }
191
144
  renderApp();
192
145
  return () => {
193
- var _a3, _b2;
146
+ var _a2, _b2;
194
147
  if (appRef.current) {
195
148
  const { appInfo: appInfo2 } = appRef.current;
196
149
  if (appInfo2.cache) {
197
150
  logger(`MicroApp Garfish.loadApp "${appInfo2.name}" hide`);
198
- (_a3 = appRef.current) == null ? void 0 : _a3.hide();
151
+ (_a2 = appRef.current) == null ? void 0 : _a2.hide();
199
152
  } else {
200
153
  logger(`MicroApp Garfish.loadApp "${appInfo2.name}" unmount`);
201
154
  (_b2 = appRef.current) == null ? void 0 : _b2.unmount();
File without changes
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.4.0",
14
+ "version": "2.5.0",
15
15
  "jsnext:source": "./src/cli/index.ts",
16
16
  "types": "./dist/types/cli/index.d.ts",
17
17
  "typesVersions": {
@@ -33,26 +33,25 @@
33
33
  ]
34
34
  }
35
35
  },
36
- "main": "./dist/js/node/cli/index.js",
37
- "module": "./dist/js/treeshaking/runtime/index.js",
38
- "jsnext:modern": "./dist/js/modern/cli/index.js",
36
+ "main": "./dist/cjs/cli/index.js",
37
+ "module": "./dist/esm/runtime/index.js",
39
38
  "exports": {
40
39
  "./types": "./type.d.ts",
41
40
  ".": {
42
41
  "jsnext:source": "./src/cli/index.ts",
43
- "default": "./dist/js/node/cli/index.js"
42
+ "default": "./dist/cjs/cli/index.js"
44
43
  },
45
44
  "./cli": {
46
45
  "jsnext:source": "./src/cli/index.ts",
47
- "default": "./dist/js/node/cli/index.js"
46
+ "default": "./dist/cjs/cli/index.js"
48
47
  },
49
48
  "./deps": {
50
49
  "jsnext:source": "./src/deps/index.ts",
51
- "default": "./dist/js/treeshaking/deps/index.js"
50
+ "default": "./dist/esm/deps/index.js"
52
51
  },
53
52
  "./runtime": {
54
53
  "jsnext:source": "./src/index.ts",
55
- "default": "./dist/js/treeshaking/runtime/index.js"
54
+ "default": "./dist/esm/runtime/index.js"
56
55
  }
57
56
  },
58
57
  "dependencies": {
@@ -63,10 +62,10 @@
63
62
  "garfish": "^1.8.1",
64
63
  "hoist-non-react-statics": "^3.3.2",
65
64
  "react-loadable": "^5.5.0",
66
- "@modern-js/utils": "2.4.0"
65
+ "@modern-js/utils": "2.5.0"
67
66
  },
68
67
  "peerDependencies": {
69
- "@modern-js/runtime": "^2.4.0"
68
+ "@modern-js/runtime": "^2.5.0"
70
69
  },
71
70
  "peerDependenciesMeta": {
72
71
  "@modern-js/runtime": {
@@ -88,13 +87,13 @@
88
87
  "react-router-dom": "^6.6.0",
89
88
  "typescript": "^4",
90
89
  "webpack-chain": "^6.5.1",
91
- "@modern-js/app-tools": "2.4.0",
92
- "@modern-js/core": "2.4.0",
93
- "@modern-js/runtime": "2.4.0",
94
- "@modern-js/plugin-router-v5": "2.4.0",
95
- "@modern-js/types": "2.4.0",
96
- "@scripts/build": "2.4.0",
97
- "@scripts/jest-config": "2.4.0"
90
+ "@modern-js/app-tools": "2.5.0",
91
+ "@modern-js/core": "2.5.0",
92
+ "@modern-js/runtime": "2.5.0",
93
+ "@modern-js/plugin-router-v5": "2.5.0",
94
+ "@modern-js/types": "2.5.0",
95
+ "@scripts/build": "2.5.0",
96
+ "@scripts/jest-config": "2.5.0"
98
97
  },
99
98
  "sideEffects": false,
100
99
  "modernConfig": {},