@appigram/react-code-split-ssr 1.2.4 → 1.2.7
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/lib/bundle.js +2 -2
- package/lib/generate-routes.js +2 -2
- package/package.json +7 -7
package/lib/bundle.js
CHANGED
|
@@ -20,7 +20,7 @@ const Bundle = ({ mod, loading }) => {
|
|
|
20
20
|
})();
|
|
21
21
|
}, []);
|
|
22
22
|
const Mod = state.mod;
|
|
23
|
-
const Loading = loading || (() => _jsx("div", {}
|
|
24
|
-
return state.mod ? _jsx(Mod, {}
|
|
23
|
+
const Loading = loading || (() => _jsx("div", {}));
|
|
24
|
+
return state.mod ? _jsx(Mod, {}) : _jsx(Loading, {});
|
|
25
25
|
};
|
|
26
26
|
export default Bundle;
|
package/lib/generate-routes.js
CHANGED
|
@@ -25,10 +25,10 @@ const generateRoutes = (options = {
|
|
|
25
25
|
return bundle;
|
|
26
26
|
const isRouteMatched = (preload && preload.path === path) || (!preload && !path);
|
|
27
27
|
const Element = isRouteMatched ? preloadedComp.default : bundle;
|
|
28
|
-
return isRouteMatched ? _jsx(Element, {}
|
|
28
|
+
return isRouteMatched ? _jsx(Element, {}) : Element;
|
|
29
29
|
};
|
|
30
30
|
return (_jsxs(Routes, { children: [options.routes.map((props, i) => {
|
|
31
31
|
return (_jsx(Route, { path: props.path, element: renderElement(props.path, props.element) }, i));
|
|
32
|
-
}), _jsx(Route, { path: '*', element: renderElement(null, options.notFoundComp) }, 'nf')] }
|
|
32
|
+
}), _jsx(Route, { path: '*', element: renderElement(null, options.notFoundComp) }, 'nf')] }));
|
|
33
33
|
});
|
|
34
34
|
export default generateRoutes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appigram/react-code-split-ssr",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
4
4
|
"description": "React code splitting with SSR",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"author": "Eugene Sysmanov",
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@types/react": "^
|
|
26
|
-
"@types/react-router-dom": "^5.3.
|
|
25
|
+
"@types/react": "^18.0.12",
|
|
26
|
+
"@types/react-router-dom": "^5.3.3",
|
|
27
27
|
"tslint": "^6.1.3",
|
|
28
28
|
"tslint-react": "^5.0.0",
|
|
29
|
-
"typescript": "^4.
|
|
29
|
+
"typescript": "^4.7.3"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"react": "^
|
|
33
|
-
"react-dom": "^
|
|
34
|
-
"react-router-dom": "^6.
|
|
32
|
+
"react": "^18.1.0",
|
|
33
|
+
"react-dom": "^18.1.0",
|
|
34
|
+
"react-router-dom": "^6.3.0"
|
|
35
35
|
}
|
|
36
36
|
}
|