@docusaurus/types 4.0.0-canary-6905 → 4.0.0-canary-6909

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