@modern-js/runtime 2.64.0 → 2.64.1
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/dist/cjs/core/browser/index.js +10 -2
- package/dist/cjs/state/cli/index.js +2 -2
- package/dist/esm/core/browser/index.js +5 -1
- package/dist/esm/state/cli/index.js +2 -2
- package/dist/esm-node/core/browser/index.js +5 -1
- package/dist/esm-node/state/cli/index.js +2 -2
- package/dist/types/cli/template.d.ts +2 -2
- package/dist/types/core/browser/index.d.ts +4 -0
- package/package.json +10 -10
|
@@ -28,7 +28,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var browser_exports = {};
|
|
30
30
|
__export(browser_exports, {
|
|
31
|
-
|
|
31
|
+
hydrateWithReact17: () => hydrateWithReact17,
|
|
32
|
+
hydrateWithReact18: () => hydrateWithReact18,
|
|
33
|
+
render: () => render,
|
|
34
|
+
renderWithReact17: () => renderWithReact17,
|
|
35
|
+
renderWithReact18: () => renderWithReact18
|
|
32
36
|
});
|
|
33
37
|
module.exports = __toCommonJS(browser_exports);
|
|
34
38
|
var import_cookie = __toESM(require("cookie"));
|
|
@@ -156,5 +160,9 @@ async function hydrateWithReact17(App, rootElement, callback) {
|
|
|
156
160
|
}
|
|
157
161
|
// Annotate the CommonJS export names for ESM import in node:
|
|
158
162
|
0 && (module.exports = {
|
|
159
|
-
|
|
163
|
+
hydrateWithReact17,
|
|
164
|
+
hydrateWithReact18,
|
|
165
|
+
render,
|
|
166
|
+
renderWithReact17,
|
|
167
|
+
renderWithReact18
|
|
160
168
|
});
|
|
@@ -33,8 +33,8 @@ const statePlugin = () => ({
|
|
|
33
33
|
api._internalRuntimePlugins(({ entrypoint, plugins }) => {
|
|
34
34
|
var _getEntryOptions;
|
|
35
35
|
const { entryName, isMainEntry } = entrypoint;
|
|
36
|
-
const userConfig = api.
|
|
37
|
-
const { packageName, metaName } = api.
|
|
36
|
+
const userConfig = api.getNormalizedConfig();
|
|
37
|
+
const { packageName, metaName } = api.getAppContext();
|
|
38
38
|
const stateConfig = (_getEntryOptions = (0, import_utils.getEntryOptions)(entryName, isMainEntry, userConfig.runtime, userConfig.runtimeByEntries, packageName)) === null || _getEntryOptions === void 0 ? void 0 : _getEntryOptions.state;
|
|
39
39
|
if (stateConfig) {
|
|
40
40
|
plugins.push({
|
|
@@ -11,8 +11,8 @@ var statePlugin = function() {
|
|
|
11
11
|
var entrypoint = param.entrypoint, plugins = param.plugins;
|
|
12
12
|
var _getEntryOptions;
|
|
13
13
|
var entryName = entrypoint.entryName, isMainEntry = entrypoint.isMainEntry;
|
|
14
|
-
var userConfig = api.
|
|
15
|
-
var
|
|
14
|
+
var userConfig = api.getNormalizedConfig();
|
|
15
|
+
var _api_getAppContext = api.getAppContext(), packageName = _api_getAppContext.packageName, metaName = _api_getAppContext.metaName;
|
|
16
16
|
var stateConfig = (_getEntryOptions = getEntryOptions(entryName, isMainEntry, userConfig.runtime, userConfig.runtimeByEntries, packageName)) === null || _getEntryOptions === void 0 ? void 0 : _getEntryOptions.state;
|
|
17
17
|
if (stateConfig) {
|
|
18
18
|
plugins.push({
|
|
@@ -9,8 +9,8 @@ const statePlugin = () => ({
|
|
|
9
9
|
api._internalRuntimePlugins(({ entrypoint, plugins }) => {
|
|
10
10
|
var _getEntryOptions;
|
|
11
11
|
const { entryName, isMainEntry } = entrypoint;
|
|
12
|
-
const userConfig = api.
|
|
13
|
-
const { packageName, metaName } = api.
|
|
12
|
+
const userConfig = api.getNormalizedConfig();
|
|
13
|
+
const { packageName, metaName } = api.getAppContext();
|
|
14
14
|
const stateConfig = (_getEntryOptions = getEntryOptions(entryName, isMainEntry, userConfig.runtime, userConfig.runtimeByEntries, packageName)) === null || _getEntryOptions === void 0 ? void 0 : _getEntryOptions.state;
|
|
15
15
|
if (stateConfig) {
|
|
16
16
|
plugins.push({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RuntimePluginConfig } from '@modern-js/app-tools';
|
|
2
2
|
export declare const index: ({ srcDirectory, internalSrcAlias, metaName, entry, entryName, customEntry, customBootstrap, mountId, }: {
|
|
3
3
|
srcDirectory: string;
|
|
4
4
|
internalSrcAlias: string;
|
|
@@ -16,7 +16,7 @@ export declare const runtimeRegister: ({ entryName, srcDirectory, internalSrcAli
|
|
|
16
16
|
internalSrcAlias: string;
|
|
17
17
|
metaName: string;
|
|
18
18
|
runtimeConfigFile: string | false;
|
|
19
|
-
runtimePlugins:
|
|
19
|
+
runtimePlugins: RuntimePluginConfig[];
|
|
20
20
|
}) => string;
|
|
21
21
|
export declare const runtimeGlobalContext: ({ srcDirectory, internalSrcAlias, metaName, entry, customEntry, }: {
|
|
22
22
|
srcDirectory: string;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
export type RenderFunc = typeof render;
|
|
3
3
|
export declare function render(App: React.ReactElement, id?: HTMLElement | string): Promise<HTMLElement | import("react-dom/client").Root>;
|
|
4
|
+
export declare function renderWithReact18(App: React.ReactElement, rootElement: HTMLElement): Promise<import("react-dom/client").Root>;
|
|
5
|
+
export declare function renderWithReact17(App: React.ReactElement, rootElement: HTMLElement): Promise<HTMLElement>;
|
|
6
|
+
export declare function hydrateWithReact18(App: React.ReactElement, rootElement: HTMLElement): Promise<import("react-dom/client").Root>;
|
|
7
|
+
export declare function hydrateWithReact17(App: React.ReactElement, rootElement: HTMLElement, callback?: () => void): Promise<any>;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.64.
|
|
18
|
+
"version": "2.64.1",
|
|
19
19
|
"engines": {
|
|
20
20
|
"node": ">=14.17.6"
|
|
21
21
|
},
|
|
@@ -200,12 +200,12 @@
|
|
|
200
200
|
"react-is": "^18",
|
|
201
201
|
"react-side-effect": "^2.1.1",
|
|
202
202
|
"styled-components": "^5.3.1",
|
|
203
|
-
"@modern-js/plugin": "2.64.
|
|
204
|
-
"@modern-js/plugin-
|
|
205
|
-
"@modern-js/plugin-
|
|
206
|
-
"@modern-js/
|
|
207
|
-
"@modern-js/utils": "2.64.
|
|
208
|
-
"@modern-js/
|
|
203
|
+
"@modern-js/plugin": "2.64.1",
|
|
204
|
+
"@modern-js/plugin-v2": "2.64.1",
|
|
205
|
+
"@modern-js/plugin-data-loader": "2.64.1",
|
|
206
|
+
"@modern-js/types": "2.64.1",
|
|
207
|
+
"@modern-js/runtime-utils": "2.64.1",
|
|
208
|
+
"@modern-js/utils": "2.64.1"
|
|
209
209
|
},
|
|
210
210
|
"peerDependencies": {
|
|
211
211
|
"react": ">=17",
|
|
@@ -229,9 +229,9 @@
|
|
|
229
229
|
"ts-node": "^10.9.1",
|
|
230
230
|
"typescript": "^5",
|
|
231
231
|
"webpack": "^5.97.1",
|
|
232
|
-
"@modern-js/app-tools": "2.64.
|
|
233
|
-
"@scripts/build": "2.64.
|
|
234
|
-
"@scripts/jest-config": "2.64.
|
|
232
|
+
"@modern-js/app-tools": "2.64.1",
|
|
233
|
+
"@scripts/build": "2.64.1",
|
|
234
|
+
"@scripts/jest-config": "2.64.1"
|
|
235
235
|
},
|
|
236
236
|
"sideEffects": false,
|
|
237
237
|
"publishConfig": {
|