@bleedingdev/modern-js-create 3.2.0-ultramodern.45 → 3.2.0-ultramodern.46
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/index.js +70 -64
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2910,40 +2910,55 @@ export default function ShellCartPage() {
|
|
|
2910
2910
|
`;
|
|
2911
2911
|
}
|
|
2912
2912
|
function createShellRemoteComponents() {
|
|
2913
|
-
return `import {
|
|
2914
|
-
import
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
export const
|
|
2942
|
-
export
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2913
|
+
return `import { createLazyComponent } from '@module-federation/modern-js-v3/react';
|
|
2914
|
+
import { getInstance } from '@module-federation/modern-js-v3/runtime';
|
|
2915
|
+
|
|
2916
|
+
const remoteFallback =
|
|
2917
|
+
({ error }: { error: Error }) =>
|
|
2918
|
+
<div data-remote-error={error.name}>Remote unavailable</div>;
|
|
2919
|
+
|
|
2920
|
+
export const Header = createLazyComponent({
|
|
2921
|
+
export: 'default',
|
|
2922
|
+
fallback: remoteFallback,
|
|
2923
|
+
instance: getInstance(),
|
|
2924
|
+
loader: () => import('explore/Header'),
|
|
2925
|
+
loading: null,
|
|
2926
|
+
});
|
|
2927
|
+
export const StorePicker = createLazyComponent({
|
|
2928
|
+
export: 'default',
|
|
2929
|
+
fallback: remoteFallback,
|
|
2930
|
+
instance: getInstance(),
|
|
2931
|
+
loader: () => import('explore/StorePicker'),
|
|
2932
|
+
loading: null,
|
|
2933
|
+
});
|
|
2934
|
+
export const Recommendations = createLazyComponent({
|
|
2935
|
+
export: 'default',
|
|
2936
|
+
fallback: remoteFallback,
|
|
2937
|
+
instance: getInstance(),
|
|
2938
|
+
loader: () => import('explore/Recommendations'),
|
|
2939
|
+
loading: null,
|
|
2940
|
+
});
|
|
2941
|
+
export const ProductPage = createLazyComponent({
|
|
2942
|
+
export: 'default',
|
|
2943
|
+
fallback: remoteFallback,
|
|
2944
|
+
instance: getInstance(),
|
|
2945
|
+
loader: () => import('decide/ProductPage'),
|
|
2946
|
+
loading: null,
|
|
2947
|
+
});
|
|
2948
|
+
export const MiniCart = createLazyComponent({
|
|
2949
|
+
export: 'default',
|
|
2950
|
+
fallback: remoteFallback,
|
|
2951
|
+
instance: getInstance(),
|
|
2952
|
+
loader: () => import('checkout/MiniCart'),
|
|
2953
|
+
loading: null,
|
|
2954
|
+
});
|
|
2955
|
+
export const CartPage = createLazyComponent({
|
|
2956
|
+
export: 'default',
|
|
2957
|
+
fallback: remoteFallback,
|
|
2958
|
+
instance: getInstance(),
|
|
2959
|
+
loader: () => import('checkout/CartPage'),
|
|
2960
|
+
loading: null,
|
|
2961
|
+
});
|
|
2947
2962
|
`;
|
|
2948
2963
|
}
|
|
2949
2964
|
function createRemotePage(app) {
|
|
@@ -3242,36 +3257,27 @@ export default function ${componentName}() {
|
|
|
3242
3257
|
`;
|
|
3243
3258
|
}
|
|
3244
3259
|
function createDecideRemoteComponents() {
|
|
3245
|
-
return `import {
|
|
3246
|
-
import
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
<React.Suspense fallback={null}>
|
|
3267
|
-
<Component />
|
|
3268
|
-
</React.Suspense>
|
|
3269
|
-
);
|
|
3270
|
-
};
|
|
3271
|
-
};
|
|
3272
|
-
|
|
3273
|
-
export const AddToCart = lazyRemote('checkout/AddToCart');
|
|
3274
|
-
export const Recommendations = lazyRemote('explore/Recommendations');
|
|
3260
|
+
return `import { createLazyComponent } from '@module-federation/modern-js-v3/react';
|
|
3261
|
+
import { getInstance } from '@module-federation/modern-js-v3/runtime';
|
|
3262
|
+
|
|
3263
|
+
const remoteFallback =
|
|
3264
|
+
({ error }: { error: Error }) =>
|
|
3265
|
+
<div data-remote-error={error.name}>Remote unavailable</div>;
|
|
3266
|
+
|
|
3267
|
+
export const AddToCart = createLazyComponent({
|
|
3268
|
+
export: 'default',
|
|
3269
|
+
fallback: remoteFallback,
|
|
3270
|
+
instance: getInstance(),
|
|
3271
|
+
loader: () => import('checkout/AddToCart'),
|
|
3272
|
+
loading: null,
|
|
3273
|
+
});
|
|
3274
|
+
export const Recommendations = createLazyComponent({
|
|
3275
|
+
export: 'default',
|
|
3276
|
+
fallback: remoteFallback,
|
|
3277
|
+
instance: getInstance(),
|
|
3278
|
+
loader: () => import('explore/Recommendations'),
|
|
3279
|
+
loading: null,
|
|
3280
|
+
});
|
|
3275
3281
|
`;
|
|
3276
3282
|
}
|
|
3277
3283
|
function remoteComponentOutputPath(app, expose) {
|
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"engines": {
|
|
22
22
|
"node": ">=20"
|
|
23
23
|
},
|
|
24
|
-
"version": "3.2.0-ultramodern.
|
|
24
|
+
"version": "3.2.0-ultramodern.46",
|
|
25
25
|
"types": "./dist/types/index.d.ts",
|
|
26
26
|
"main": "./dist/index.js",
|
|
27
27
|
"bin": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@types/node": "^25.9.1",
|
|
42
42
|
"@typescript/native-preview": "7.0.0-dev.20260527.2",
|
|
43
43
|
"tsx": "^4.22.3",
|
|
44
|
-
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.
|
|
44
|
+
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.46"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -54,6 +54,6 @@
|
|
|
54
54
|
"start": "node ./dist/index.js"
|
|
55
55
|
},
|
|
56
56
|
"ultramodern": {
|
|
57
|
-
"frameworkVersion": "3.2.0-ultramodern.
|
|
57
|
+
"frameworkVersion": "3.2.0-ultramodern.46"
|
|
58
58
|
}
|
|
59
59
|
}
|