@modern-js/plugin-garfish 2.15.0 → 2.17.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.
- package/CHANGELOG.md +23 -0
- package/dist/cjs/cli/index.js +224 -236
- package/dist/cjs/cli/utils.js +24 -48
- package/dist/cjs/deps/index.js +12 -35
- package/dist/cjs/index.js +26 -36
- package/dist/cjs/runtime/index.js +24 -44
- package/dist/cjs/runtime/loadable.js +46 -58
- package/dist/cjs/runtime/plugin.js +86 -82
- package/dist/cjs/runtime/useModuleApps.js +70 -56
- package/dist/cjs/runtime/utils/Context.js +18 -36
- package/dist/cjs/runtime/utils/MApp.js +88 -87
- package/dist/cjs/runtime/utils/apps.js +114 -94
- package/dist/cjs/runtime/utils/setExternal.js +23 -41
- package/dist/cjs/util.js +21 -40
- package/dist/esm/cli/index.js +409 -402
- package/dist/esm/cli/utils.js +25 -26
- package/dist/esm/deps/index.js +1 -2
- package/dist/esm/index.js +1 -2
- package/dist/esm/runtime/index.js +3 -4
- package/dist/esm/runtime/loadable.js +226 -210
- package/dist/esm/runtime/plugin.js +456 -426
- package/dist/esm/runtime/useModuleApps.js +49 -50
- package/dist/esm/runtime/utils/Context.js +1 -1
- package/dist/esm/runtime/utils/MApp.js +337 -316
- package/dist/esm/runtime/utils/apps.js +468 -442
- package/dist/esm/runtime/utils/setExternal.js +9 -9
- package/dist/esm/util.js +4 -5
- package/dist/esm-node/cli/index.js +209 -219
- package/dist/esm-node/cli/utils.js +15 -30
- package/dist/esm-node/deps/index.js +1 -4
- package/dist/esm-node/index.js +1 -4
- package/dist/esm-node/runtime/index.js +3 -10
- package/dist/esm-node/runtime/loadable.js +34 -31
- package/dist/esm-node/runtime/plugin.js +50 -33
- package/dist/esm-node/runtime/useModuleApps.js +12 -19
- package/dist/esm-node/runtime/utils/Context.js +2 -5
- package/dist/esm-node/runtime/utils/MApp.js +61 -40
- package/dist/esm-node/runtime/utils/apps.js +38 -44
- package/dist/esm-node/runtime/utils/setExternal.js +5 -5
- package/dist/esm-node/util.js +4 -9
- 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
|
-
|
|
6
|
-
logger("setExternal ", {
|
|
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
|
-
};
|
package/dist/esm-node/util.js
CHANGED
|
@@ -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
|
|
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":
|
|
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.
|
|
18
|
+
"version": "2.17.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.
|
|
73
|
+
"@modern-js/utils": "2.17.0"
|
|
70
74
|
},
|
|
71
75
|
"peerDependencies": {
|
|
72
|
-
"@modern-js/runtime": "^2.
|
|
76
|
+
"@modern-js/runtime": "^2.17.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.
|
|
89
|
-
"@modern-js/core": "2.
|
|
90
|
-
"@modern-js/plugin-router-v5": "2.
|
|
91
|
-
"@modern-js/runtime": "2.
|
|
92
|
-
"@modern-js/types": "2.
|
|
93
|
-
"@scripts/build": "2.
|
|
94
|
-
"@scripts/jest-config": "2.
|
|
92
|
+
"@modern-js/app-tools": "2.17.0",
|
|
93
|
+
"@modern-js/core": "2.17.0",
|
|
94
|
+
"@modern-js/plugin-router-v5": "2.17.0",
|
|
95
|
+
"@modern-js/runtime": "2.17.0",
|
|
96
|
+
"@modern-js/types": "2.17.0",
|
|
97
|
+
"@scripts/build": "2.17.0",
|
|
98
|
+
"@scripts/jest-config": "2.17.0"
|
|
95
99
|
},
|
|
96
100
|
"sideEffects": false,
|
|
97
101
|
"modernConfig": {},
|