@docusaurus/core 0.0.0-4323 → 0.0.0-4325

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.
@@ -218,8 +218,7 @@ async function load(siteDir, options = {}) {
218
218
  const genClientModules = (0, utils_1.generate)(generatedFilesDir, 'client-modules.js', `export default [\n${clientModules
219
219
  // import() is async so we use require() because client modules can have
220
220
  // CSS and the order matters for loading CSS.
221
- // We need to JSON.stringify so that if its on windows, backslash are escaped.
222
- .map((module) => ` require(${JSON.stringify(module)}),`)
221
+ .map((module) => ` require('${(0, utils_1.escapePath)(module)}'),`)
223
222
  .join('\n')}\n];\n`);
224
223
  // Load extra head & body html tags.
225
224
  const { headTags, preBodyTags, postBodyTags } = (0, html_tags_1.loadHtmlTags)(plugins);
@@ -228,9 +227,7 @@ async function load(siteDir, options = {}) {
228
227
  const genRegistry = (0, utils_1.generate)(generatedFilesDir, 'registry.js', `export default {
229
228
  ${Object.keys(registry)
230
229
  .sort()
231
- .map((key) =>
232
- // We need to JSON.stringify so that if its on windows, backslash are escaped.
233
- ` '${key}': [${registry[key].loader}, ${JSON.stringify(registry[key].modulePath)}, require.resolveWeak(${JSON.stringify(registry[key].modulePath)})],`)
230
+ .map((key) => ` '${key}': [${registry[key].loader}, '${(0, utils_1.escapePath)(registry[key].modulePath)}', require.resolveWeak('${(0, utils_1.escapePath)(registry[key].modulePath)}')],`)
234
231
  .join('\n')}};\n`);
235
232
  const genRoutesChunkNames = (0, utils_1.generate)(generatedFilesDir, 'routesChunkNames.json', JSON.stringify(routesChunkNames, null, 2));
236
233
  const genRoutes = (0, utils_1.generate)(generatedFilesDir, 'routes.js', routesConfig);
@@ -122,8 +122,7 @@ registry, value, prefix, name) {
122
122
  if (isModule(value)) {
123
123
  const modulePath = getModulePath(value);
124
124
  const chunkName = (0, utils_1.genChunkName)(modulePath, prefix, name);
125
- // We need to JSON.stringify so that if its on windows, backslashes are escaped.
126
- const loader = `() => import(/* webpackChunkName: '${chunkName}' */ ${JSON.stringify(modulePath)})`;
125
+ const loader = `() => import(/* webpackChunkName: '${chunkName}' */ '${(0, utils_1.escapePath)(modulePath)}')`;
127
126
  registry[chunkName] = {
128
127
  loader,
129
128
  modulePath,
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-4323",
4
+ "version": "0.0.0-4325",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -41,13 +41,13 @@
41
41
  "@babel/runtime": "^7.16.3",
42
42
  "@babel/runtime-corejs3": "^7.16.3",
43
43
  "@babel/traverse": "^7.16.3",
44
- "@docusaurus/cssnano-preset": "0.0.0-4323",
45
- "@docusaurus/logger": "0.0.0-4323",
46
- "@docusaurus/mdx-loader": "0.0.0-4323",
44
+ "@docusaurus/cssnano-preset": "0.0.0-4325",
45
+ "@docusaurus/logger": "0.0.0-4325",
46
+ "@docusaurus/mdx-loader": "0.0.0-4325",
47
47
  "@docusaurus/react-loadable": "5.5.2",
48
- "@docusaurus/utils": "0.0.0-4323",
49
- "@docusaurus/utils-common": "0.0.0-4323",
50
- "@docusaurus/utils-validation": "0.0.0-4323",
48
+ "@docusaurus/utils": "0.0.0-4325",
49
+ "@docusaurus/utils-common": "0.0.0-4325",
50
+ "@docusaurus/utils-validation": "0.0.0-4325",
51
51
  "@slorber/static-site-generator-webpack-plugin": "^4.0.0",
52
52
  "@svgr/webpack": "^6.0.0",
53
53
  "autoprefixer": "^10.3.5",
@@ -108,8 +108,8 @@
108
108
  "webpackbar": "^5.0.0-3"
109
109
  },
110
110
  "devDependencies": {
111
- "@docusaurus/module-type-aliases": "0.0.0-4323",
112
- "@docusaurus/types": "0.0.0-4323",
111
+ "@docusaurus/module-type-aliases": "0.0.0-4325",
112
+ "@docusaurus/types": "0.0.0-4325",
113
113
  "@types/copy-webpack-plugin": "^8.0.1",
114
114
  "@types/css-minimizer-webpack-plugin": "^3.0.2",
115
115
  "@types/detect-port": "^1.3.0",
@@ -128,5 +128,5 @@
128
128
  "engines": {
129
129
  "node": ">=14"
130
130
  },
131
- "gitHead": "63bb7f3417035a64c6b9158509c003782d1eeeb7"
131
+ "gitHead": "faf4f3f741b442a5805d6e871788a631839a9cc9"
132
132
  }