@docusaurus/types 4.0.0-canary-6905 → 4.0.0-canary-6907
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/package.json +2 -2
- package/src/config.d.ts +21 -18
- package/src/index.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/types",
|
|
3
|
-
"version": "4.0.0-canary-
|
|
3
|
+
"version": "4.0.0-canary-6907",
|
|
4
4
|
"description": "Common types for Docusaurus packages.",
|
|
5
5
|
"types": "./src/index.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"react": "^19.3.0",
|
|
29
29
|
"react-dom": "^19.3.0"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "cef1eb4729aa96d4153a6079ef160d74fe1db32a"
|
|
32
32
|
}
|
package/src/config.d.ts
CHANGED
|
@@ -24,14 +24,20 @@ export type StorageConfig = {
|
|
|
24
24
|
namespace: boolean | string;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
export type
|
|
28
|
-
|
|
27
|
+
export type WebpackConfig = {
|
|
28
|
+
/**
|
|
29
|
+
* Configuration for alternative JS loaders. "babel" will use the built-in
|
|
30
|
+
* Babel loader and preset; otherwise, you can provide your custom Webpack
|
|
31
|
+
* rule set.
|
|
32
|
+
*/
|
|
33
|
+
// TODO Docusaurus v4
|
|
34
|
+
// Use an object type ({isServer}) so that it conforms to jsLoaderFactory
|
|
35
|
+
jsLoader?: 'babel' | ((isServer: boolean) => RuleSetRule);
|
|
29
36
|
};
|
|
30
37
|
|
|
31
38
|
export type FutureV4Config = {
|
|
32
39
|
useCssCascadeLayers: boolean;
|
|
33
40
|
siteStorageNamespacing: boolean;
|
|
34
|
-
fasterByDefault: boolean;
|
|
35
41
|
};
|
|
36
42
|
|
|
37
43
|
// VCS (Version Control System) info about a given change, e.g., a git commit.
|
|
@@ -87,8 +93,6 @@ export type FutureConfig = {
|
|
|
87
93
|
*/
|
|
88
94
|
v4: FutureV4Config;
|
|
89
95
|
|
|
90
|
-
faster: FasterConfig;
|
|
91
|
-
|
|
92
96
|
/**
|
|
93
97
|
* Docusaurus can work with 2 router types.
|
|
94
98
|
*
|
|
@@ -379,18 +383,12 @@ export type DocusaurusConfig = {
|
|
|
379
383
|
* @default true
|
|
380
384
|
*/
|
|
381
385
|
baseUrlIssueBanner: boolean;
|
|
382
|
-
/**
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
*/
|
|
389
|
-
// TODO Docusaurus v4
|
|
390
|
-
// Use an object type ({isServer}) so that it conforms to jsLoaderFactory
|
|
391
|
-
// Eventually deprecate this if swc loader becomes stable?
|
|
392
|
-
jsLoader?: 'babel' | ((isServer: boolean) => RuleSetRule);
|
|
393
|
-
};
|
|
386
|
+
/**
|
|
387
|
+
* Docusaurus uses Rspack by default.
|
|
388
|
+
* When provided, Docusaurus uses Webpack and Babel instead.
|
|
389
|
+
* @deprecated Webpack and Babel support will be removed in Docusaurus v5
|
|
390
|
+
*/
|
|
391
|
+
webpack?: WebpackConfig;
|
|
394
392
|
/** Markdown-related options. */
|
|
395
393
|
markdown: MarkdownConfig;
|
|
396
394
|
};
|
|
@@ -407,11 +405,16 @@ export type Config = Overwrite<
|
|
|
407
405
|
url: DocusaurusConfig['url'];
|
|
408
406
|
baseUrl: DocusaurusConfig['baseUrl'];
|
|
409
407
|
vcs?: VcsPreset | VcsConfig | boolean;
|
|
408
|
+
/**
|
|
409
|
+
* Docusaurus uses Rspack by default.
|
|
410
|
+
* Use `true` or an object to use Webpack and Babel instead.
|
|
411
|
+
* @deprecated Webpack and Babel support will be removed in Docusaurus v5
|
|
412
|
+
*/
|
|
413
|
+
webpack?: boolean | WebpackConfig;
|
|
410
414
|
future?: Overwrite<
|
|
411
415
|
DeepPartial<FutureConfig>,
|
|
412
416
|
{
|
|
413
417
|
v4?: boolean | Partial<FutureV4Config>;
|
|
414
|
-
faster?: boolean | Partial<FasterConfig>;
|
|
415
418
|
}
|
|
416
419
|
>;
|
|
417
420
|
}
|