@docusaurus/core 0.0.0-4998 → 0.0.0-5008

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.
@@ -5,4 +5,9 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import Loadable from 'react-loadable';
8
+ declare global {
9
+ interface NodeRequire {
10
+ resolveWeak: (name: string) => number;
11
+ }
12
+ }
8
13
  export default function ComponentCreator(path: string, hash: string): ReturnType<typeof Loadable>;
@@ -16,11 +16,17 @@ export default function ComponentCreator(path, hash) {
16
16
  if (path === '*') {
17
17
  return Loadable({
18
18
  loading: Loading,
19
- loader: () => import('@theme/NotFound').then(({ default: NotFound }) => (props) => (<RouteContextProvider
20
- // Do we want a better name than native-default?
21
- value={{ plugin: { name: 'native', id: 'default' } }}>
19
+ loader: () => import('@theme/NotFound'),
20
+ modules: ['@theme/NotFound'],
21
+ webpack: () => [require.resolveWeak('@theme/NotFound')],
22
+ render(loaded, props) {
23
+ const NotFound = loaded.default;
24
+ return (<RouteContextProvider
25
+ // Do we want a better name than native-default?
26
+ value={{ plugin: { name: 'native', id: 'default' } }}>
22
27
  <NotFound {...props}/>
23
- </RouteContextProvider>)),
28
+ </RouteContextProvider>);
29
+ },
24
30
  });
25
31
  }
26
32
  const chunkNames = routesChunkNames[`${path}-${hash}`];
@@ -49,7 +55,7 @@ export default function ComponentCreator(path, hash) {
49
55
  loader,
50
56
  modules,
51
57
  webpack: () => optsWebpack,
52
- render: (loaded, props) => {
58
+ render(loaded, props) {
53
59
  // `loaded` will be a map from key path (as returned from the flattened
54
60
  // chunk names) to the modules loaded from the loaders. We now have to
55
61
  // restore the chunk names' previous shape from this flat record.
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-4998",
4
+ "version": "0.0.0-5008",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -41,13 +41,13 @@
41
41
  "@babel/runtime": "^7.17.9",
42
42
  "@babel/runtime-corejs3": "^7.17.9",
43
43
  "@babel/traverse": "^7.17.10",
44
- "@docusaurus/cssnano-preset": "0.0.0-4998",
45
- "@docusaurus/logger": "0.0.0-4998",
46
- "@docusaurus/mdx-loader": "0.0.0-4998",
44
+ "@docusaurus/cssnano-preset": "0.0.0-5008",
45
+ "@docusaurus/logger": "0.0.0-5008",
46
+ "@docusaurus/mdx-loader": "0.0.0-5008",
47
47
  "@docusaurus/react-loadable": "5.5.2",
48
- "@docusaurus/utils": "0.0.0-4998",
49
- "@docusaurus/utils-common": "0.0.0-4998",
50
- "@docusaurus/utils-validation": "0.0.0-4998",
48
+ "@docusaurus/utils": "0.0.0-5008",
49
+ "@docusaurus/utils-common": "0.0.0-5008",
50
+ "@docusaurus/utils-validation": "0.0.0-5008",
51
51
  "@slorber/static-site-generator-webpack-plugin": "^4.0.4",
52
52
  "@svgr/webpack": "^6.2.1",
53
53
  "autoprefixer": "^10.4.7",
@@ -104,8 +104,8 @@
104
104
  "webpackbar": "^5.0.2"
105
105
  },
106
106
  "devDependencies": {
107
- "@docusaurus/module-type-aliases": "0.0.0-4998",
108
- "@docusaurus/types": "0.0.0-4998",
107
+ "@docusaurus/module-type-aliases": "0.0.0-5008",
108
+ "@docusaurus/types": "0.0.0-5008",
109
109
  "@types/detect-port": "^1.3.2",
110
110
  "@types/react-dom": "^18.0.3",
111
111
  "@types/react-router-config": "^5.0.6",
@@ -125,5 +125,5 @@
125
125
  "engines": {
126
126
  "node": ">=14"
127
127
  },
128
- "gitHead": "3b063e3ac0ab4addef21111ad7c92309771b1f73"
128
+ "gitHead": "240ae8300c8a16a1ff854aac3a62456ca00855c0"
129
129
  }