@modern-js/plugin-garfish 2.15.0 → 2.16.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 (41) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/cli/index.js +224 -236
  3. package/dist/cjs/cli/utils.js +24 -48
  4. package/dist/cjs/deps/index.js +12 -35
  5. package/dist/cjs/index.js +26 -36
  6. package/dist/cjs/runtime/index.js +24 -44
  7. package/dist/cjs/runtime/loadable.js +46 -58
  8. package/dist/cjs/runtime/plugin.js +86 -82
  9. package/dist/cjs/runtime/useModuleApps.js +70 -56
  10. package/dist/cjs/runtime/utils/Context.js +18 -36
  11. package/dist/cjs/runtime/utils/MApp.js +88 -87
  12. package/dist/cjs/runtime/utils/apps.js +114 -94
  13. package/dist/cjs/runtime/utils/setExternal.js +23 -41
  14. package/dist/cjs/util.js +21 -40
  15. package/dist/esm/cli/index.js +409 -402
  16. package/dist/esm/cli/utils.js +25 -26
  17. package/dist/esm/deps/index.js +1 -2
  18. package/dist/esm/index.js +1 -2
  19. package/dist/esm/runtime/index.js +3 -4
  20. package/dist/esm/runtime/loadable.js +226 -210
  21. package/dist/esm/runtime/plugin.js +456 -426
  22. package/dist/esm/runtime/useModuleApps.js +49 -50
  23. package/dist/esm/runtime/utils/Context.js +1 -1
  24. package/dist/esm/runtime/utils/MApp.js +337 -316
  25. package/dist/esm/runtime/utils/apps.js +468 -442
  26. package/dist/esm/runtime/utils/setExternal.js +9 -9
  27. package/dist/esm/util.js +4 -5
  28. package/dist/esm-node/cli/index.js +209 -219
  29. package/dist/esm-node/cli/utils.js +15 -30
  30. package/dist/esm-node/deps/index.js +1 -4
  31. package/dist/esm-node/index.js +1 -4
  32. package/dist/esm-node/runtime/index.js +3 -10
  33. package/dist/esm-node/runtime/loadable.js +34 -31
  34. package/dist/esm-node/runtime/plugin.js +50 -33
  35. package/dist/esm-node/runtime/useModuleApps.js +12 -19
  36. package/dist/esm-node/runtime/utils/Context.js +2 -5
  37. package/dist/esm-node/runtime/utils/MApp.js +61 -40
  38. package/dist/esm-node/runtime/utils/apps.js +38 -44
  39. package/dist/esm-node/runtime/utils/setExternal.js +5 -5
  40. package/dist/esm-node/util.js +4 -9
  41. package/package.json +15 -11
@@ -2,11 +2,11 @@ import React from "react";
2
2
  import ReactDOM from "react-dom";
3
3
  import garfish from "garfish";
4
4
  import { logger } from "../../util";
5
- var setExternal_default = () => {
6
- logger("setExternal ", { react: React, "react-dom": ReactDOM });
5
+ export default () => {
6
+ logger("setExternal ", {
7
+ react: React,
8
+ "react-dom": ReactDOM
9
+ });
7
10
  garfish.setExternal("react", React);
8
11
  garfish.setExternal("react-dom", ReactDOM);
9
12
  };
10
- export {
11
- setExternal_default as default
12
- };
@@ -1,11 +1,6 @@
1
1
  import createDebug from "debug";
2
- const logger = createDebug("modern-js:plugin-garfish");
3
- const SUBMODULE_APP_COMPONENT_KEY = "SubModuleComponent";
4
- function generateSubAppContainerKey(moduleInfo) {
5
- return moduleInfo ? `modern_sub_app_container_${decodeURIComponent(moduleInfo == null ? void 0 : moduleInfo.name)}` : "modern_sub_app_container";
2
+ export const logger = createDebug("modern-js:plugin-garfish");
3
+ export const SUBMODULE_APP_COMPONENT_KEY = "SubModuleComponent";
4
+ export function generateSubAppContainerKey(moduleInfo) {
5
+ return moduleInfo ? `modern_sub_app_container_${decodeURIComponent(moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.name)}` : "modern_sub_app_container";
6
6
  }
7
- export {
8
- SUBMODULE_APP_COMPONENT_KEY,
9
- generateSubAppContainerKey,
10
- logger
11
- };
package/package.json CHANGED
@@ -3,7 +3,11 @@
3
3
  "description": "A Progressive React Framework for modern web development.",
4
4
  "homepage": "https://modernjs.dev",
5
5
  "bugs": "https://github.com/web-infra-dev/modern.js/issues",
6
- "repository": "web-infra-dev/modern.js",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/web-infra-dev/modern.js",
9
+ "directory": "packages/runtime/plugin-garfish"
10
+ },
7
11
  "license": "MIT",
8
12
  "keywords": [
9
13
  "react",
@@ -11,7 +15,7 @@
11
15
  "modern",
12
16
  "modern.js"
13
17
  ],
14
- "version": "2.15.0",
18
+ "version": "2.16.0",
15
19
  "jsnext:source": "./src/cli/index.ts",
16
20
  "types": "./dist/types/cli/index.d.ts",
17
21
  "typesVersions": {
@@ -66,10 +70,10 @@
66
70
  "garfish": "^1.8.1",
67
71
  "hoist-non-react-statics": "^3.3.2",
68
72
  "react-loadable": "^5.5.0",
69
- "@modern-js/utils": "2.15.0"
73
+ "@modern-js/utils": "2.16.0"
70
74
  },
71
75
  "peerDependencies": {
72
- "@modern-js/runtime": "^2.15.0"
76
+ "@modern-js/runtime": "^2.16.0"
73
77
  },
74
78
  "devDependencies": {
75
79
  "@testing-library/jest-dom": "^5.16.1",
@@ -85,13 +89,13 @@
85
89
  "react-router-dom": "^6.8.1",
86
90
  "typescript": "^4",
87
91
  "webpack-chain": "^6.5.1",
88
- "@modern-js/app-tools": "2.15.0",
89
- "@modern-js/core": "2.15.0",
90
- "@modern-js/plugin-router-v5": "2.15.0",
91
- "@modern-js/runtime": "2.15.0",
92
- "@modern-js/types": "2.15.0",
93
- "@scripts/build": "2.15.0",
94
- "@scripts/jest-config": "2.15.0"
92
+ "@modern-js/app-tools": "2.16.0",
93
+ "@modern-js/core": "2.16.0",
94
+ "@modern-js/plugin-router-v5": "2.16.0",
95
+ "@modern-js/runtime": "2.16.0",
96
+ "@modern-js/types": "2.16.0",
97
+ "@scripts/build": "2.16.0",
98
+ "@scripts/jest-config": "2.16.0"
95
99
  },
96
100
  "sideEffects": false,
97
101
  "modernConfig": {},