@docusaurus/core 0.0.0-4739 → 0.0.0-4740

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.
@@ -51,7 +51,8 @@ export default function ComponentCreator(path, hash) {
51
51
  if (chunkRegistry) {
52
52
  // eslint-disable-next-line prefer-destructuring
53
53
  optsLoader[key] = chunkRegistry[0];
54
- optsModules.push(chunkRegistry[1], chunkRegistry[2]);
54
+ optsModules.push(chunkRegistry[1]);
55
+ optsWebpack.push(chunkRegistry[2]);
55
56
  }
56
57
  });
57
58
  return Loadable.Map({
@@ -67,11 +68,13 @@ export default function ComponentCreator(path, hash) {
67
68
  if (!newComp) {
68
69
  throw new Error(`The page component at ${path} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);
69
70
  }
70
- Object.keys(loaded[key])
71
- .filter((k) => k !== 'default')
72
- .forEach((nonDefaultKey) => {
73
- newComp[nonDefaultKey] = loaded[key][nonDefaultKey];
74
- });
71
+ if (typeof newComp === 'object' || typeof newComp === 'function') {
72
+ Object.keys(loaded[key])
73
+ .filter((k) => k !== 'default')
74
+ .forEach((nonDefaultKey) => {
75
+ newComp[nonDefaultKey] = loaded[key][nonDefaultKey];
76
+ });
77
+ }
75
78
  let val = loadedModules;
76
79
  const keyPath = key.split('.');
77
80
  keyPath.slice(0, -1).forEach((k) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@docusaurus/core",
3
3
  "description": "Easy to Maintain Open Source Documentation Websites",
4
- "version": "0.0.0-4739",
4
+ "version": "0.0.0-4740",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -41,13 +41,13 @@
41
41
  "@babel/runtime": "^7.17.7",
42
42
  "@babel/runtime-corejs3": "^7.17.7",
43
43
  "@babel/traverse": "^7.17.3",
44
- "@docusaurus/cssnano-preset": "0.0.0-4739",
45
- "@docusaurus/logger": "0.0.0-4739",
46
- "@docusaurus/mdx-loader": "0.0.0-4739",
44
+ "@docusaurus/cssnano-preset": "0.0.0-4740",
45
+ "@docusaurus/logger": "0.0.0-4740",
46
+ "@docusaurus/mdx-loader": "0.0.0-4740",
47
47
  "@docusaurus/react-loadable": "5.5.2",
48
- "@docusaurus/utils": "0.0.0-4739",
49
- "@docusaurus/utils-common": "0.0.0-4739",
50
- "@docusaurus/utils-validation": "0.0.0-4739",
48
+ "@docusaurus/utils": "0.0.0-4740",
49
+ "@docusaurus/utils-common": "0.0.0-4740",
50
+ "@docusaurus/utils-validation": "0.0.0-4740",
51
51
  "@slorber/static-site-generator-webpack-plugin": "^4.0.1",
52
52
  "@svgr/webpack": "^6.2.1",
53
53
  "autoprefixer": "^10.4.2",
@@ -106,8 +106,8 @@
106
106
  "webpackbar": "^5.0.2"
107
107
  },
108
108
  "devDependencies": {
109
- "@docusaurus/module-type-aliases": "0.0.0-4739",
110
- "@docusaurus/types": "0.0.0-4739",
109
+ "@docusaurus/module-type-aliases": "0.0.0-4740",
110
+ "@docusaurus/types": "0.0.0-4740",
111
111
  "@types/detect-port": "^1.3.2",
112
112
  "@types/nprogress": "^0.2.0",
113
113
  "@types/react-dom": "^17.0.13",
@@ -128,5 +128,5 @@
128
128
  "engines": {
129
129
  "node": ">=14"
130
130
  },
131
- "gitHead": "5902cd7b653725a71940b98169190908d22cffe9"
131
+ "gitHead": "748bd31bfb847dd2ac4598e03420163c5cbfacd7"
132
132
  }