@docusaurus/core 3.6.3-canary-6175 → 3.6.3-canary-6176

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.
Files changed (2) hide show
  1. package/lib/webpack/base.js +12 -8
  2. package/package.json +14 -14
@@ -23,14 +23,18 @@ const LibrariesToTranspile = [
23
23
  'copy-text-to-clipboard', // Contains optional catch binding, incompatible with recent versions of Edge
24
24
  ];
25
25
  const LibrariesToTranspileRegex = new RegExp(LibrariesToTranspile.map((libName) => `(node_modules/${libName})`).join('|'));
26
- const ReactAliases = process.env
27
- .DOCUSAURUS_NO_REACT_ALIASES
28
- ? {}
29
- : {
30
- react: path_1.default.dirname(require.resolve('react/package.json')),
31
- 'react-dom': path_1.default.dirname(require.resolve('react-dom/package.json')),
32
- '@mdx-js/react': path_1.default.dirname(require.resolve('@mdx-js/react')),
26
+ function getReactAliases(siteDir) {
27
+ // Escape hatch
28
+ if (process.env.DOCUSAURUS_NO_REACT_ALIASES) {
29
+ return {};
30
+ }
31
+ const resolveSitePkg = (id) => require.resolve(id, { paths: [siteDir] });
32
+ return {
33
+ react: path_1.default.dirname(resolveSitePkg('react/package.json')),
34
+ 'react-dom': path_1.default.dirname(resolveSitePkg('react-dom/package.json')),
35
+ '@mdx-js/react': path_1.default.dirname(resolveSitePkg('@mdx-js/react')),
33
36
  };
37
+ }
34
38
  function excludeJS(modulePath) {
35
39
  // Always transpile client dir
36
40
  if (modulePath.startsWith(exports.clientDir)) {
@@ -137,7 +141,7 @@ async function createBaseConfig({ props, isServer, minify, faster, configureWebp
137
141
  process.cwd(),
138
142
  ],
139
143
  alias: {
140
- ...ReactAliases,
144
+ ...getReactAliases(siteDir),
141
145
  '@site': siteDir,
142
146
  '@generated': generatedFilesDir,
143
147
  ...(await (0, aliases_1.loadDocusaurusAliases)()),
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": "3.6.3-canary-6175",
4
+ "version": "3.6.3-canary-6176",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -33,13 +33,13 @@
33
33
  "url": "https://github.com/facebook/docusaurus/issues"
34
34
  },
35
35
  "dependencies": {
36
- "@docusaurus/babel": "3.6.3-canary-6175",
37
- "@docusaurus/bundler": "3.6.3-canary-6175",
38
- "@docusaurus/logger": "3.6.3-canary-6175",
39
- "@docusaurus/mdx-loader": "3.6.3-canary-6175",
40
- "@docusaurus/utils": "3.6.3-canary-6175",
41
- "@docusaurus/utils-common": "3.6.3-canary-6175",
42
- "@docusaurus/utils-validation": "3.6.3-canary-6175",
36
+ "@docusaurus/babel": "3.6.3-canary-6176",
37
+ "@docusaurus/bundler": "3.6.3-canary-6176",
38
+ "@docusaurus/logger": "3.6.3-canary-6176",
39
+ "@docusaurus/mdx-loader": "3.6.3-canary-6176",
40
+ "@docusaurus/utils": "3.6.3-canary-6176",
41
+ "@docusaurus/utils-common": "3.6.3-canary-6176",
42
+ "@docusaurus/utils-validation": "3.6.3-canary-6176",
43
43
  "boxen": "^6.2.1",
44
44
  "chalk": "^4.1.2",
45
45
  "chokidar": "^3.5.3",
@@ -60,7 +60,7 @@
60
60
  "p-map": "^4.0.0",
61
61
  "prompts": "^2.4.2",
62
62
  "react-dev-utils": "^12.0.1",
63
- "react-helmet-async": "^1.3.0",
63
+ "react-helmet-async": "npm:@slorber/react-helmet-async@1.3.0",
64
64
  "react-loadable": "npm:@docusaurus/react-loadable@6.0.0",
65
65
  "react-loadable-ssr-addon-v5-slorber": "^1.0.1",
66
66
  "react-router": "^5.3.4",
@@ -78,8 +78,8 @@
78
78
  "webpack-merge": "^6.0.1"
79
79
  },
80
80
  "devDependencies": {
81
- "@docusaurus/module-type-aliases": "3.6.3-canary-6175",
82
- "@docusaurus/types": "3.6.3-canary-6175",
81
+ "@docusaurus/module-type-aliases": "3.6.3-canary-6176",
82
+ "@docusaurus/types": "3.6.3-canary-6176",
83
83
  "@total-typescript/shoehorn": "^0.1.2",
84
84
  "@types/detect-port": "^1.3.3",
85
85
  "@types/react-dom": "^18.2.7",
@@ -94,11 +94,11 @@
94
94
  },
95
95
  "peerDependencies": {
96
96
  "@mdx-js/react": "^3.0.0",
97
- "react": "^18.0.0",
98
- "react-dom": "^18.0.0"
97
+ "react": "^18.0.0 || ^19.0.0",
98
+ "react-dom": "^18.0.0 || ^19.0.0"
99
99
  },
100
100
  "engines": {
101
101
  "node": ">=18.0"
102
102
  },
103
- "gitHead": "6379e15ec19a06688a04753a96e7d0710745fa77"
103
+ "gitHead": "4a34744aa84f7713ec3b4403691e96bbdd76ac3f"
104
104
  }