@docusaurus/core 3.9.2-canary-6526 → 3.9.2-canary-6541
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.
- package/lib/commands/build/buildLocale.js +1 -1
- package/lib/commands/start/webpack.js +1 -1
- package/lib/server/configValidation.d.ts +1 -1
- package/lib/server/configValidation.js +79 -25
- package/lib/server/plugins/synthetic.js +1 -1
- package/lib/server/siteMessages.js +1 -1
- package/lib/server/storage.d.ts +1 -4
- package/lib/server/storage.js +4 -4
- package/lib/ssg/ssgExecutor.js +1 -2
- package/lib/ssg/ssgParams.js +1 -2
- package/lib/webpack/base.js +1 -1
- package/lib/webpack/server.js +1 -1
- package/package.json +17 -11
|
@@ -132,7 +132,7 @@ async function getBuildClientConfig({ props, cliOptions, configureWebpackUtils,
|
|
|
132
132
|
const result = await (0, client_1.createBuildClientConfig)({
|
|
133
133
|
props,
|
|
134
134
|
minify: cliOptions.minify ?? true,
|
|
135
|
-
faster: props.siteConfig.future.
|
|
135
|
+
faster: props.siteConfig.future.faster,
|
|
136
136
|
configureWebpackUtils,
|
|
137
137
|
bundleAnalyzer: cliOptions.bundleAnalyzer ?? false,
|
|
138
138
|
});
|
|
@@ -102,7 +102,7 @@ async function getStartClientConfig({ props, minify, poll, configureWebpackUtils
|
|
|
102
102
|
let { clientConfig: config } = await (0, client_1.createStartClientConfig)({
|
|
103
103
|
props,
|
|
104
104
|
minify,
|
|
105
|
-
faster: props.siteConfig.future.
|
|
105
|
+
faster: props.siteConfig.future.faster,
|
|
106
106
|
poll,
|
|
107
107
|
configureWebpackUtils,
|
|
108
108
|
});
|
|
@@ -15,6 +15,6 @@ export declare const DEFAULT_FUTURE_V4_CONFIG_TRUE: FutureV4Config;
|
|
|
15
15
|
export declare const DEFAULT_FUTURE_CONFIG: FutureConfig;
|
|
16
16
|
export declare const DEFAULT_MARKDOWN_HOOKS: MarkdownHooks;
|
|
17
17
|
export declare const DEFAULT_MARKDOWN_CONFIG: MarkdownConfig;
|
|
18
|
-
export declare const DEFAULT_CONFIG: Pick<DocusaurusConfig, 'i18n' | 'future' | 'onBrokenLinks' | 'onBrokenAnchors' | 'onBrokenMarkdownLinks' | 'onDuplicateRoutes' | 'plugins' | 'themes' | 'presets' | 'headTags' | 'stylesheets' | 'scripts' | 'clientModules' | 'customFields' | 'themeConfig' | 'titleDelimiter' | 'noIndex' | 'tagline' | 'baseUrlIssueBanner' | 'staticDirectories' | 'markdown'>;
|
|
18
|
+
export declare const DEFAULT_CONFIG: Pick<DocusaurusConfig, 'i18n' | 'storage' | 'future' | 'onBrokenLinks' | 'onBrokenAnchors' | 'onBrokenMarkdownLinks' | 'onDuplicateRoutes' | 'plugins' | 'themes' | 'presets' | 'headTags' | 'stylesheets' | 'scripts' | 'clientModules' | 'customFields' | 'themeConfig' | 'titleDelimiter' | 'noIndex' | 'tagline' | 'baseUrlIssueBanner' | 'staticDirectories' | 'markdown'>;
|
|
19
19
|
export declare const ConfigSchema: Joi.ObjectSchema<DocusaurusConfig>;
|
|
20
20
|
export declare function validateConfig(config: unknown, siteConfigPath: string): DocusaurusConfig;
|
|
@@ -72,16 +72,19 @@ exports.DEFAULT_FASTER_CONFIG_TRUE = {
|
|
|
72
72
|
exports.DEFAULT_FUTURE_V4_CONFIG = {
|
|
73
73
|
removeLegacyPostBuildHeadAttribute: false,
|
|
74
74
|
useCssCascadeLayers: false,
|
|
75
|
+
siteStorageNamespacing: false,
|
|
76
|
+
fasterByDefault: false,
|
|
75
77
|
};
|
|
76
78
|
// When using the "v4: true" shortcut
|
|
77
79
|
exports.DEFAULT_FUTURE_V4_CONFIG_TRUE = {
|
|
78
80
|
removeLegacyPostBuildHeadAttribute: true,
|
|
79
81
|
useCssCascadeLayers: true,
|
|
82
|
+
siteStorageNamespacing: true,
|
|
83
|
+
fasterByDefault: true,
|
|
80
84
|
};
|
|
81
85
|
exports.DEFAULT_FUTURE_CONFIG = {
|
|
82
86
|
v4: exports.DEFAULT_FUTURE_V4_CONFIG,
|
|
83
|
-
|
|
84
|
-
experimental_storage: exports.DEFAULT_STORAGE_CONFIG,
|
|
87
|
+
faster: exports.DEFAULT_FASTER_CONFIG,
|
|
85
88
|
experimental_vcs: (0, utils_1.getVcsPreset)('default-v1'),
|
|
86
89
|
experimental_router: 'browser',
|
|
87
90
|
};
|
|
@@ -108,6 +111,7 @@ exports.DEFAULT_MARKDOWN_CONFIG = {
|
|
|
108
111
|
};
|
|
109
112
|
exports.DEFAULT_CONFIG = {
|
|
110
113
|
i18n: exports.DEFAULT_I18N_CONFIG,
|
|
114
|
+
storage: exports.DEFAULT_STORAGE_CONFIG,
|
|
111
115
|
future: exports.DEFAULT_FUTURE_CONFIG,
|
|
112
116
|
onBrokenLinks: 'throw',
|
|
113
117
|
onBrokenAnchors: 'warn', // TODO Docusaurus v4: change to throw
|
|
@@ -197,26 +201,30 @@ const I18N_CONFIG_SCHEMA = utils_validation_1.Joi.object({
|
|
|
197
201
|
})
|
|
198
202
|
.optional()
|
|
199
203
|
.default(exports.DEFAULT_I18N_CONFIG);
|
|
204
|
+
// Individual boolean defaults are not set here on purpose
|
|
205
|
+
// They are resolved in postProcessDocusaurusConfig based on
|
|
206
|
+
// the future.v4.fasterByDefault flag
|
|
200
207
|
const FASTER_CONFIG_SCHEMA = utils_validation_1.Joi.alternatives()
|
|
201
208
|
.try(utils_validation_1.Joi.object({
|
|
202
|
-
swcJsLoader: utils_validation_1.Joi.boolean()
|
|
203
|
-
swcJsMinimizer: utils_validation_1.Joi.boolean()
|
|
204
|
-
swcHtmlMinimizer: utils_validation_1.Joi.boolean()
|
|
205
|
-
lightningCssMinimizer: utils_validation_1.Joi.boolean()
|
|
206
|
-
mdxCrossCompilerCache: utils_validation_1.Joi.boolean()
|
|
207
|
-
rspackBundler: utils_validation_1.Joi.boolean()
|
|
208
|
-
rspackPersistentCache: utils_validation_1.Joi.boolean()
|
|
209
|
-
ssgWorkerThreads: utils_validation_1.Joi.boolean()
|
|
210
|
-
gitEagerVcs: utils_validation_1.Joi.boolean()
|
|
209
|
+
swcJsLoader: utils_validation_1.Joi.boolean(),
|
|
210
|
+
swcJsMinimizer: utils_validation_1.Joi.boolean(),
|
|
211
|
+
swcHtmlMinimizer: utils_validation_1.Joi.boolean(),
|
|
212
|
+
lightningCssMinimizer: utils_validation_1.Joi.boolean(),
|
|
213
|
+
mdxCrossCompilerCache: utils_validation_1.Joi.boolean(),
|
|
214
|
+
rspackBundler: utils_validation_1.Joi.boolean(),
|
|
215
|
+
rspackPersistentCache: utils_validation_1.Joi.boolean(),
|
|
216
|
+
ssgWorkerThreads: utils_validation_1.Joi.boolean(),
|
|
217
|
+
gitEagerVcs: utils_validation_1.Joi.boolean(),
|
|
211
218
|
}), utils_validation_1.Joi.boolean()
|
|
212
219
|
.required()
|
|
213
220
|
.custom((bool) => bool ? exports.DEFAULT_FASTER_CONFIG_TRUE : exports.DEFAULT_FASTER_CONFIG))
|
|
214
|
-
.optional()
|
|
215
|
-
.default(exports.DEFAULT_FASTER_CONFIG);
|
|
221
|
+
.optional();
|
|
216
222
|
const FUTURE_V4_SCHEMA = utils_validation_1.Joi.alternatives()
|
|
217
223
|
.try(utils_validation_1.Joi.object({
|
|
218
224
|
removeLegacyPostBuildHeadAttribute: utils_validation_1.Joi.boolean().default(exports.DEFAULT_FUTURE_V4_CONFIG.removeLegacyPostBuildHeadAttribute),
|
|
219
225
|
useCssCascadeLayers: utils_validation_1.Joi.boolean().default(exports.DEFAULT_FUTURE_V4_CONFIG.useCssCascadeLayers),
|
|
226
|
+
siteStorageNamespacing: utils_validation_1.Joi.boolean().default(exports.DEFAULT_FUTURE_V4_CONFIG.siteStorageNamespacing),
|
|
227
|
+
fasterByDefault: utils_validation_1.Joi.boolean().default(exports.DEFAULT_FUTURE_V4_CONFIG.fasterByDefault),
|
|
220
228
|
}), utils_validation_1.Joi.boolean()
|
|
221
229
|
.required()
|
|
222
230
|
.custom((bool) => bool ? exports.DEFAULT_FUTURE_V4_CONFIG_TRUE : exports.DEFAULT_FUTURE_V4_CONFIG))
|
|
@@ -226,12 +234,13 @@ const STORAGE_CONFIG_SCHEMA = utils_validation_1.Joi.object({
|
|
|
226
234
|
type: utils_validation_1.Joi.string()
|
|
227
235
|
.equal('localStorage', 'sessionStorage')
|
|
228
236
|
.default(exports.DEFAULT_STORAGE_CONFIG.type),
|
|
229
|
-
namespace
|
|
230
|
-
|
|
231
|
-
|
|
237
|
+
// namespace default is not set here on purpose
|
|
238
|
+
// It is resolved in postProcessDocusaurusConfig based on
|
|
239
|
+
// the future.v4.siteStorageNamespacing flag
|
|
240
|
+
namespace: utils_validation_1.Joi.alternatives().try(utils_validation_1.Joi.string(), utils_validation_1.Joi.boolean()),
|
|
232
241
|
})
|
|
233
242
|
.optional()
|
|
234
|
-
.default(exports.DEFAULT_STORAGE_CONFIG);
|
|
243
|
+
.default({ type: exports.DEFAULT_STORAGE_CONFIG.type });
|
|
235
244
|
const VCS_CONFIG_OBJECT_SCHEMA = utils_validation_1.Joi.object({
|
|
236
245
|
// All the fields are required on purpose
|
|
237
246
|
// You either provide a full VCS config or nothing
|
|
@@ -262,12 +271,21 @@ const VCS_CONFIG_SCHEMA = utils_validation_1.Joi.custom((input) => {
|
|
|
262
271
|
}).default(true);
|
|
263
272
|
const FUTURE_CONFIG_SCHEMA = utils_validation_1.Joi.object({
|
|
264
273
|
v4: FUTURE_V4_SCHEMA,
|
|
265
|
-
|
|
266
|
-
experimental_storage: STORAGE_CONFIG_SCHEMA,
|
|
274
|
+
faster: FASTER_CONFIG_SCHEMA,
|
|
267
275
|
experimental_vcs: VCS_CONFIG_SCHEMA,
|
|
268
276
|
experimental_router: utils_validation_1.Joi.string()
|
|
269
277
|
.equal('browser', 'hash')
|
|
270
278
|
.default(exports.DEFAULT_FUTURE_CONFIG.experimental_router),
|
|
279
|
+
experimental_storage: utils_validation_1.Joi.any()
|
|
280
|
+
.forbidden()
|
|
281
|
+
.messages({
|
|
282
|
+
'any.unknown': `The Docusaurus config ${logger_1.default.code('future.experimental_storage')} has been promoted to a stable top-level ${logger_1.default.code('storage')} config attribute. Please move your storage config to the top level.`,
|
|
283
|
+
}),
|
|
284
|
+
experimental_faster: utils_validation_1.Joi.any()
|
|
285
|
+
.forbidden()
|
|
286
|
+
.messages({
|
|
287
|
+
'any.unknown': `The Docusaurus config ${logger_1.default.code('future.experimental_faster')} has been renamed to ${logger_1.default.code('future.faster')}. Please update your Docusaurus config.`,
|
|
288
|
+
}),
|
|
271
289
|
})
|
|
272
290
|
.optional()
|
|
273
291
|
.default(exports.DEFAULT_FUTURE_CONFIG);
|
|
@@ -280,6 +298,7 @@ exports.ConfigSchema = utils_validation_1.Joi.object({
|
|
|
280
298
|
title: utils_validation_1.Joi.string().required(),
|
|
281
299
|
trailingSlash: utils_validation_1.Joi.boolean(), // No default value! undefined = retrocompatible legacy behavior!
|
|
282
300
|
i18n: I18N_CONFIG_SCHEMA,
|
|
301
|
+
storage: STORAGE_CONFIG_SCHEMA,
|
|
283
302
|
future: FUTURE_CONFIG_SCHEMA,
|
|
284
303
|
onBrokenLinks: utils_validation_1.Joi.string()
|
|
285
304
|
.equal('ignore', 'log', 'warn', 'throw')
|
|
@@ -394,6 +413,41 @@ exports.ConfigSchema = utils_validation_1.Joi.object({
|
|
|
394
413
|
// Expressing this kind of logic in Joi is a pain
|
|
395
414
|
// We also want to decouple logic from Joi: easier to remove it later!
|
|
396
415
|
function postProcessDocusaurusConfig(config) {
|
|
416
|
+
// Resolve storage.namespace based on the v4 future flag
|
|
417
|
+
// undefined means "not explicitly set by user"
|
|
418
|
+
if (config.storage.namespace === undefined) {
|
|
419
|
+
config.storage.namespace = config.future.v4.siteStorageNamespacing;
|
|
420
|
+
}
|
|
421
|
+
// Resolve faster config based on the v4.fasterByDefault flag
|
|
422
|
+
// undefined means "not explicitly set by user"
|
|
423
|
+
if (config.future.faster === undefined) {
|
|
424
|
+
config.future.faster = {};
|
|
425
|
+
}
|
|
426
|
+
const fasterDefault = config.future.v4.fasterByDefault;
|
|
427
|
+
const fasterKeys = Object.keys(exports.DEFAULT_FASTER_CONFIG);
|
|
428
|
+
for (const key of fasterKeys) {
|
|
429
|
+
if (config.future.faster[key] === undefined) {
|
|
430
|
+
config.future.faster[key] = fasterDefault;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
// Docusaurus Faster doesn't fully support Yarn PnP :s
|
|
434
|
+
// Until we support Rspack + PnP, we simply revert to Webpack with a warning
|
|
435
|
+
// See https://github.com/facebook/docusaurus/issues/10787
|
|
436
|
+
if (process.versions.pnp) {
|
|
437
|
+
if (config.future.faster.rspackBundler) {
|
|
438
|
+
logger_1.default.warn(`Docusaurus Faster doesn't fully support the Yarn PnP linker yet.
|
|
439
|
+
We recommend to use Yarn node-linker instead.
|
|
440
|
+
Docusaurus will still attempt to build your app with Webpack (instead of Rspack) and use slower minimizers.
|
|
441
|
+
See also https://github.com/facebook/docusaurus/issues/10787`);
|
|
442
|
+
config.future.faster.rspackBundler = false;
|
|
443
|
+
config.future.faster.rspackPersistentCache = false;
|
|
444
|
+
// This also won't work due to Webpack libs using peerDependencies :s
|
|
445
|
+
// This could eventually work if the deps are added at the site level
|
|
446
|
+
// TODO Docusaurus v4 clean this up
|
|
447
|
+
config.future.faster.lightningCssMinimizer = false;
|
|
448
|
+
config.future.faster.swcJsMinimizer = false;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
397
451
|
if (config.onBrokenMarkdownLinks) {
|
|
398
452
|
logger_1.default.warn `The code=${'siteConfig.onBrokenMarkdownLinks'} config option is deprecated and will be removed in Docusaurus v4.
|
|
399
453
|
Please migrate and move this option to code=${'siteConfig.markdown.hooks.onBrokenMarkdownLinks'} instead.`;
|
|
@@ -405,21 +459,21 @@ Please migrate and move this option to code=${'siteConfig.markdown.hooks.onBroke
|
|
|
405
459
|
// We normalize the VCS config when using a boolean value
|
|
406
460
|
if (typeof config.future.experimental_vcs === 'boolean') {
|
|
407
461
|
const vcsConfig = config.future.experimental_vcs
|
|
408
|
-
? config.future.
|
|
462
|
+
? config.future.faster.gitEagerVcs
|
|
409
463
|
? (0, utils_1.getVcsPreset)('default-v2')
|
|
410
464
|
: (0, utils_1.getVcsPreset)('default-v1')
|
|
411
465
|
: (0, utils_1.getVcsPreset)('disabled');
|
|
412
466
|
config.future.experimental_vcs = vcsConfig;
|
|
413
467
|
}
|
|
414
|
-
if (config.future.
|
|
468
|
+
if (config.future.faster.ssgWorkerThreads &&
|
|
415
469
|
!config.future.v4.removeLegacyPostBuildHeadAttribute) {
|
|
416
|
-
throw new Error(`Docusaurus config ${logger_1.default.code('future.
|
|
470
|
+
throw new Error(`Docusaurus config ${logger_1.default.code('future.faster.ssgWorkerThreads')} requires the future flag ${logger_1.default.code('future.v4.removeLegacyPostBuildHeadAttribute')} to be turned on.
|
|
417
471
|
If you use Docusaurus Faster, we recommend that you also activate Docusaurus v4 future flags: ${logger_1.default.code('{future: {v4: true}}')}
|
|
418
472
|
All the v4 future flags are documented here: https://docusaurus.io/docs/api/docusaurus-config#future`);
|
|
419
473
|
}
|
|
420
|
-
if (config.future.
|
|
421
|
-
!config.future.
|
|
422
|
-
throw new Error(`Docusaurus config flag ${logger_1.default.code('future.
|
|
474
|
+
if (config.future.faster.rspackPersistentCache &&
|
|
475
|
+
!config.future.faster.rspackBundler) {
|
|
476
|
+
throw new Error(`Docusaurus config flag ${logger_1.default.code('future.faster.rspackPersistentCache')} requires the flag ${logger_1.default.code('future.faster.rspackBundler')} to be turned on.`);
|
|
423
477
|
}
|
|
424
478
|
}
|
|
425
479
|
// TODO move to @docusaurus/utils-validation
|
|
@@ -60,7 +60,7 @@ function createBootstrapPlugin({ siteDir, siteConfig, }) {
|
|
|
60
60
|
*/
|
|
61
61
|
async function createMDXFallbackPlugin({ siteDir, siteConfig, }) {
|
|
62
62
|
const mdxLoaderItem = await (0, mdx_loader_1.createMDXLoaderItem)({
|
|
63
|
-
useCrossCompilerCache: siteConfig.future.
|
|
63
|
+
useCrossCompilerCache: siteConfig.future.faster.mdxCrossCompilerCache,
|
|
64
64
|
admonitions: true,
|
|
65
65
|
staticDirs: siteConfig.staticDirectories.map((dir) => path_1.default.resolve(siteDir, dir)),
|
|
66
66
|
siteDir,
|
|
@@ -15,7 +15,7 @@ const babel_1 = require("@docusaurus/babel");
|
|
|
15
15
|
const logger_1 = tslib_1.__importDefault(require("@docusaurus/logger"));
|
|
16
16
|
const uselessBabelConfigMessages = async ({ site }) => {
|
|
17
17
|
const { props: { siteDir, siteConfig }, } = site;
|
|
18
|
-
if (siteConfig.future.
|
|
18
|
+
if (siteConfig.future.faster.swcJsLoader) {
|
|
19
19
|
const babelConfigFilePath = await (0, babel_1.getCustomBabelConfigFilePath)(siteDir);
|
|
20
20
|
if (babelConfigFilePath) {
|
|
21
21
|
return [
|
package/lib/server/storage.d.ts
CHANGED
|
@@ -5,9 +5,6 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import type { DocusaurusConfig, SiteStorage } from '@docusaurus/types';
|
|
8
|
-
type
|
|
9
|
-
type PartialConfig = Pick<DocusaurusConfig, 'url' | 'baseUrl'> & {
|
|
10
|
-
future: PartialFuture;
|
|
11
|
-
};
|
|
8
|
+
type PartialConfig = Pick<DocusaurusConfig, 'url' | 'baseUrl' | 'storage'>;
|
|
12
9
|
export declare function createSiteStorage(config: PartialConfig): SiteStorage;
|
|
13
10
|
export {};
|
package/lib/server/storage.js
CHANGED
|
@@ -14,18 +14,18 @@ function automaticNamespace(config) {
|
|
|
14
14
|
return (0, utils_1.simpleHash)(normalizedUrl, 3);
|
|
15
15
|
}
|
|
16
16
|
function getNamespaceString(config) {
|
|
17
|
-
if (config.
|
|
17
|
+
if (config.storage.namespace === true) {
|
|
18
18
|
return automaticNamespace(config);
|
|
19
19
|
}
|
|
20
|
-
else if (config.
|
|
20
|
+
else if (config.storage.namespace === false) {
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
|
-
return config.
|
|
24
|
+
return config.storage.namespace;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
function createSiteStorage(config) {
|
|
28
|
-
const { type } = config.
|
|
28
|
+
const { type } = config.storage;
|
|
29
29
|
const namespaceString = getNamespaceString(config);
|
|
30
30
|
const namespace = namespaceString ? `-${namespaceString}` : '';
|
|
31
31
|
return {
|
package/lib/ssg/ssgExecutor.js
CHANGED
|
@@ -136,8 +136,7 @@ async function executeSSG({ props, serverBundlePath, clientManifestPath, router,
|
|
|
136
136
|
logger_1.PerfLogger.end('Generate Hash Router entry point');
|
|
137
137
|
return { collectedData: {} };
|
|
138
138
|
}
|
|
139
|
-
const createExecutor = props.siteConfig.future.
|
|
140
|
-
.ssgWorkerThreads
|
|
139
|
+
const createExecutor = props.siteConfig.future.faster.ssgWorkerThreads
|
|
141
140
|
? createPooledSSGExecutor
|
|
142
141
|
: createSimpleSSGExecutor;
|
|
143
142
|
const executor = await createExecutor({ params, pathnames: props.routesPaths });
|
package/lib/ssg/ssgParams.js
CHANGED
|
@@ -26,8 +26,7 @@ async function createSSGParams({ props, serverBundlePath, clientManifestPath, })
|
|
|
26
26
|
noIndex: props.siteConfig.noIndex,
|
|
27
27
|
DOCUSAURUS_VERSION: utils_1.DOCUSAURUS_VERSION,
|
|
28
28
|
serverBundlePath,
|
|
29
|
-
htmlMinifierType: props.siteConfig.future.
|
|
30
|
-
.swcHtmlMinimizer
|
|
29
|
+
htmlMinifierType: props.siteConfig.future.faster.swcHtmlMinimizer
|
|
31
30
|
? 'swc'
|
|
32
31
|
: 'terser',
|
|
33
32
|
v4RemoveLegacyPostBuildHeadAttribute: props.siteConfig.future.v4.removeLegacyPostBuildHeadAttribute,
|
package/lib/webpack/base.js
CHANGED
|
@@ -86,7 +86,7 @@ async function createBaseConfig({ props, isServer, minify, faster, configureWebp
|
|
|
86
86
|
return disabledPersistentCacheValue;
|
|
87
87
|
}
|
|
88
88
|
if (props.currentBundler.name === 'rspack') {
|
|
89
|
-
if (props.siteConfig.future.
|
|
89
|
+
if (props.siteConfig.future.faster.rspackPersistentCache) {
|
|
90
90
|
// Use cache: true + experiments.cache.type: "persistent"
|
|
91
91
|
// See https://rspack.dev/config/experiments#persistent-cache
|
|
92
92
|
return true;
|
package/lib/webpack/server.js
CHANGED
|
@@ -18,7 +18,7 @@ async function createServerConfig({ props, configureWebpackUtils, }) {
|
|
|
18
18
|
props,
|
|
19
19
|
isServer: true,
|
|
20
20
|
minify: false,
|
|
21
|
-
faster: props.siteConfig.future.
|
|
21
|
+
faster: props.siteConfig.future.faster,
|
|
22
22
|
configureWebpackUtils,
|
|
23
23
|
});
|
|
24
24
|
const ProgressBarPlugin = await (0, bundler_1.getProgressBarPlugin)({
|
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.9.2-canary-
|
|
4
|
+
"version": "3.9.2-canary-6541",
|
|
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.9.2-canary-
|
|
37
|
-
"@docusaurus/bundler": "3.9.2-canary-
|
|
38
|
-
"@docusaurus/logger": "3.9.2-canary-
|
|
39
|
-
"@docusaurus/mdx-loader": "3.9.2-canary-
|
|
40
|
-
"@docusaurus/utils": "3.9.2-canary-
|
|
41
|
-
"@docusaurus/utils-common": "3.9.2-canary-
|
|
42
|
-
"@docusaurus/utils-validation": "3.9.2-canary-
|
|
36
|
+
"@docusaurus/babel": "3.9.2-canary-6541",
|
|
37
|
+
"@docusaurus/bundler": "3.9.2-canary-6541",
|
|
38
|
+
"@docusaurus/logger": "3.9.2-canary-6541",
|
|
39
|
+
"@docusaurus/mdx-loader": "3.9.2-canary-6541",
|
|
40
|
+
"@docusaurus/utils": "3.9.2-canary-6541",
|
|
41
|
+
"@docusaurus/utils-common": "3.9.2-canary-6541",
|
|
42
|
+
"@docusaurus/utils-validation": "3.9.2-canary-6541",
|
|
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.9.2-canary-
|
|
81
|
-
"@docusaurus/types": "3.9.2-canary-
|
|
80
|
+
"@docusaurus/module-type-aliases": "3.9.2-canary-6541",
|
|
81
|
+
"@docusaurus/types": "3.9.2-canary-6541",
|
|
82
82
|
"@total-typescript/shoehorn": "^0.1.2",
|
|
83
83
|
"@types/detect-port": "^1.3.3",
|
|
84
84
|
"@types/react-dom": "^19.2.3",
|
|
@@ -90,12 +90,18 @@
|
|
|
90
90
|
"tree-node-cli": "^1.6.0"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|
|
93
|
+
"@docusaurus/faster": "*",
|
|
93
94
|
"@mdx-js/react": "^3.0.0",
|
|
94
95
|
"react": "^18.0.0 || ^19.0.0",
|
|
95
96
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
96
97
|
},
|
|
98
|
+
"peerDependenciesMeta": {
|
|
99
|
+
"@docusaurus/faster": {
|
|
100
|
+
"optional": true
|
|
101
|
+
}
|
|
102
|
+
},
|
|
97
103
|
"engines": {
|
|
98
104
|
"node": ">=20.0"
|
|
99
105
|
},
|
|
100
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "60ac4995b8bfb7a1b649eb7c7ae6e812222438c5"
|
|
101
107
|
}
|