@docusaurus/core 3.7.0-canary-6298 → 3.7.0-canary-6302

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.
@@ -20,6 +20,7 @@ const server_1 = tslib_1.__importDefault(require("../../webpack/server"));
20
20
  const configure_1 = require("../../webpack/configure");
21
21
  const ssgExecutor_1 = require("../../ssg/ssgExecutor");
22
22
  const clearPath_1 = tslib_1.__importDefault(require("../utils/clearPath"));
23
+ const SkipBundling = process.env.DOCUSAURUS_SKIP_BUNDLING === 'true';
23
24
  async function buildLocale({ siteDir, locale, cliOptions, }) {
24
25
  // Temporary workaround to unlock the ability to translate the site config
25
26
  // We'll remove it if a better official API can be designed
@@ -51,17 +52,22 @@ async function buildLocale({ siteDir, locale, cliOptions, }) {
51
52
  // We also clear website/build dir
52
53
  // returns void, no useful result needed before compilation
53
54
  // See also https://github.com/facebook/docusaurus/pull/11037
54
- (0, clearPath_1.default)(outDir),
55
+ SkipBundling ? undefined : (0, clearPath_1.default)(outDir),
55
56
  ]));
56
- // Run webpack to build JS bundle (client) and static html files (server).
57
- await logger_1.PerfLogger.async(`Bundling with ${props.currentBundler.name}`, () => {
58
- return (0, bundler_1.compile)({
59
- configs:
60
- // For hash router we don't do SSG and can skip the server bundle
61
- router === 'hash' ? [clientConfig] : [clientConfig, serverConfig],
62
- currentBundler: configureWebpackUtils.currentBundler,
57
+ if (SkipBundling) {
58
+ console.warn(`Skipping the Docusaurus bundling step because DOCUSAURUS_SKIP_BUNDLING='true'`);
59
+ }
60
+ else {
61
+ // Run webpack to build JS bundle (client) and static html files (server).
62
+ await logger_1.PerfLogger.async(`Bundling with ${props.currentBundler.name}`, () => {
63
+ return (0, bundler_1.compile)({
64
+ configs:
65
+ // For hash router we don't do SSG and can skip the server bundle
66
+ router === 'hash' ? [clientConfig] : [clientConfig, serverConfig],
67
+ currentBundler: configureWebpackUtils.currentBundler,
68
+ });
63
69
  });
64
- });
70
+ }
65
71
  const { collectedData } = await logger_1.PerfLogger.async('SSG', () => (0, ssgExecutor_1.executeSSG)({
66
72
  props,
67
73
  serverBundlePath,
@@ -140,7 +146,7 @@ async function getBuildServerConfig({ props, configureWebpackUtils, }) {
140
146
  // Remove /build/server server.bundle.js because it is not needed.
141
147
  async function cleanupServerBundle(serverBundlePath) {
142
148
  if (process.env.DOCUSAURUS_KEEP_SERVER_BUNDLE === 'true') {
143
- logger_1.default.warn("Will NOT delete server bundle because DOCUSAURUS_KEEP_SERVER_BUNDLE is set to 'true'");
149
+ logger_1.default.warn("Will NOT delete server bundle because DOCUSAURUS_KEEP_SERVER_BUNDLE='true'");
144
150
  }
145
151
  else {
146
152
  await logger_1.PerfLogger.async('Deleting server bundle', async () => {
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.7.0-canary-6298",
4
+ "version": "3.7.0-canary-6302",
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.7.0-canary-6298",
37
- "@docusaurus/bundler": "3.7.0-canary-6298",
38
- "@docusaurus/logger": "3.7.0-canary-6298",
39
- "@docusaurus/mdx-loader": "3.7.0-canary-6298",
40
- "@docusaurus/utils": "3.7.0-canary-6298",
41
- "@docusaurus/utils-common": "3.7.0-canary-6298",
42
- "@docusaurus/utils-validation": "3.7.0-canary-6298",
36
+ "@docusaurus/babel": "3.7.0-canary-6302",
37
+ "@docusaurus/bundler": "3.7.0-canary-6302",
38
+ "@docusaurus/logger": "3.7.0-canary-6302",
39
+ "@docusaurus/mdx-loader": "3.7.0-canary-6302",
40
+ "@docusaurus/utils": "3.7.0-canary-6302",
41
+ "@docusaurus/utils-common": "3.7.0-canary-6302",
42
+ "@docusaurus/utils-validation": "3.7.0-canary-6302",
43
43
  "boxen": "^6.2.1",
44
44
  "chalk": "^4.1.2",
45
45
  "chokidar": "^3.5.3",
@@ -77,8 +77,8 @@
77
77
  "webpack-merge": "^6.0.1"
78
78
  },
79
79
  "devDependencies": {
80
- "@docusaurus/module-type-aliases": "3.7.0-canary-6298",
81
- "@docusaurus/types": "3.7.0-canary-6298",
80
+ "@docusaurus/module-type-aliases": "3.7.0-canary-6302",
81
+ "@docusaurus/types": "3.7.0-canary-6302",
82
82
  "@total-typescript/shoehorn": "^0.1.2",
83
83
  "@types/detect-port": "^1.3.3",
84
84
  "@types/react-dom": "^18.2.7",
@@ -98,5 +98,5 @@
98
98
  "engines": {
99
99
  "node": ">=18.0"
100
100
  },
101
- "gitHead": "9ca2065669ec6a469391c6e0c6fa1ce35132064f"
101
+ "gitHead": "872a7ce779037d0d2956f321b4fcf89e2c1cea3a"
102
102
  }