@docusaurus/bundler 4.0.0-canary-6840 → 4.0.0-canary-6842

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.
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export default function nullLoader(): string;
8
+ export declare function pitch(): string;
9
+ //# sourceMappingURL=nullLoader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nullLoader.d.ts","sourceRoot":"","sources":["../../src/loaders/nullLoader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,CAAC,OAAO,UAAU,UAAU,IAAI,MAAM,CAE3C;AAGD,wBAAgB,KAAK,IAAI,MAAM,CAE9B"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Facebook, Inc. and its affiliates.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.default = nullLoader;
10
+ exports.pitch = pitch;
11
+ // A loader returning an empty module, used to ignore some imports
12
+ // Replaces the unmaintained null-loader package and its outdated dependencies
13
+ // See https://github.com/webpack-contrib/null-loader
14
+ function nullLoader() {
15
+ return '';
16
+ }
17
+ // Pitching short-circuits the loader chain: the file isn't even read
18
+ function pitch() {
19
+ return '';
20
+ }
21
+ //# sourceMappingURL=nullLoader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nullLoader.js","sourceRoot":"","sources":["../../src/loaders/nullLoader.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH,kEAAkE;AAClE,8EAA8E;AAC9E,qDAAqD;AAErD;IACE,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,qEAAqE;AACrE;IACE,OAAO,EAAE,CAAC;AACZ,CAAC"}
@@ -27,7 +27,7 @@ async function createStyleLoadersFactory({ currentBundler, }) {
27
27
  },
28
28
  ]
29
29
  : // Ignore regular CSS files
30
- [{ loader: require.resolve('null-loader') }];
30
+ [{ loader: require.resolve('./nullLoader') }];
31
31
  }
32
32
  return [
33
33
  {
@@ -1 +1 @@
1
- {"version":3,"file":"styleLoader.js","sourceRoot":"","sources":["../../src/loaders/styleLoader.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,sDAAsD;AAG/C,KAAK,oCAAoC,EAC9C,cAAc,GAGf;IACC,MAAM,gBAAgB,GAAG,MAAM,IAAA,oCAAmB,EAAC,EAAC,cAAc,EAAC,CAAC,CAAC;IAErE,OAAO,SAAS,eAAe,CAC7B,QAAiB,EACjB,aAAa,GAET,EAAE;QAEN,MAAM,UAAU,GAA6B;YAC3C,oFAAoF;YACpF,QAAQ,EAAE,KAAK;YACf,GAAG,aAAa;SACjB,CAAC;QAEF,yDAAyD;QACzD,kEAAkE;QAClE,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,UAAU,CAAC,OAAO;gBACvB,CAAC,CAAC;oBACE;wBACE,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC;wBACrC,OAAO,EAAE,UAAU;qBACpB;iBACF;gBACH,CAAC,CAAC,2BAA2B;oBAC3B,CAAC,EAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,EAAC,CAAC,CAAC;QACjD,CAAC;QAED,OAAO;YACL;gBACE,MAAM,EAAE,gBAAgB,CAAC,MAAM;gBAC/B,OAAO,EAAE;oBACP,QAAQ,EAAE,IAAI;iBACf;aACF;YACD;gBACE,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC;gBACrC,OAAO,EAAE,UAAU;aACpB;YAED,oEAAoE;YACpE,uDAAuD;YACvD,4EAA4E;YAC5E,0DAA0D;YAC1D,kFAAkF;YAClF;gBACE,0DAA0D;gBAC1D,mEAAmE;gBACnE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,CAAC;gBACrC,OAAO,EAAE,UAAU;aACpB;YAED,oEAAoE;YACpE,uDAAuD;YACvD,4EAA4E;YAC5E,0DAA0D;YAC1D,kFAAkF;YAClF;gBACE,0DAA0D;gBAC1D,mEAAmE;gBACnE,eAAe;gBACf,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC;gBACzC,OAAO,EAAE;oBACP,cAAc,EAAE;wBACd,6CAA6C;wBAC7C,2DAA2D;wBAC3D,KAAK,EAAE,SAAS;wBAChB,OAAO,EAAE;4BACP;gCACE,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC;gCACrC;gCACE,+CAA+C;gCAC/C,2DAA2D;iCAC5D;6BACF;yBACF;qBACF;iBACF;aACF;SACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  export type HtmlMinifierType = 'swc' | 'terser';
8
- export type HtmlMinifierResult = {
8
+ type HtmlMinifierResult = {
9
9
  code: string;
10
10
  warnings: string[];
11
11
  };
@@ -15,4 +15,5 @@ export type HtmlMinifier = {
15
15
  export declare function getHtmlMinifier({ type, }: {
16
16
  type: HtmlMinifierType;
17
17
  }): Promise<HtmlMinifier>;
18
+ export {};
18
19
  //# sourceMappingURL=minifyHtml.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"minifyHtml.d.ts","sourceRoot":"","sources":["../src/minifyHtml.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEhD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACvD,CAAC;AAMF,wBAAsB,eAAe,CAAC,EACpC,IAAI,GACL,EAAE;IACD,IAAI,EAAE,gBAAgB,CAAC;CACxB,GAAG,OAAO,CAAC,YAAY,CAAC,CASxB"}
1
+ {"version":3,"file":"minifyHtml.d.ts","sourceRoot":"","sources":["../src/minifyHtml.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEhD,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACvD,CAAC;AAMF,wBAAsB,eAAe,CAAC,EACpC,IAAI,GACL,EAAE;IACD,IAAI,EAAE,gBAAgB,CAAC;CACxB,GAAG,OAAO,CAAC,YAAY,CAAC,CASxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/bundler",
3
- "version": "4.0.0-canary-6840",
3
+ "version": "4.0.0-canary-6842",
4
4
  "description": "Docusaurus util package to abstract the current bundler.",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -19,31 +19,27 @@
19
19
  "license": "MIT",
20
20
  "dependencies": {
21
21
  "@babel/core": "^7.29.7",
22
- "@docusaurus/babel": "4.0.0-canary-6840",
23
- "@docusaurus/cssnano-preset": "4.0.0-canary-6840",
24
- "@docusaurus/logger": "4.0.0-canary-6840",
25
- "@docusaurus/types": "4.0.0-canary-6840",
26
- "@docusaurus/utils": "4.0.0-canary-6840",
22
+ "@docusaurus/babel": "4.0.0-canary-6842",
23
+ "@docusaurus/cssnano-preset": "4.0.0-canary-6842",
24
+ "@docusaurus/logger": "4.0.0-canary-6842",
25
+ "@docusaurus/types": "4.0.0-canary-6842",
27
26
  "babel-loader": "^10.1.1",
28
27
  "clean-css": "^5.3.3",
29
28
  "css-loader": "^7.1.5",
30
29
  "css-minimizer-webpack-plugin": "^8.0.0",
31
30
  "cssnano": "^7.1.9",
32
- "file-loader": "^6.2.0",
33
31
  "html-minifier-terser": "^7.2.0",
34
32
  "mini-css-extract-plugin": "^2.10.2",
35
- "null-loader": "^4.0.1",
36
33
  "postcss": "^8.5.28",
37
34
  "postcss-loader": "^8.2.1",
38
35
  "postcss-preset-env": "^11.5.2",
39
36
  "terser-webpack-plugin": "^5.6.1",
40
37
  "tslib": "^2.8.1",
41
- "url-loader": "^4.1.1",
42
38
  "webpack": "^5.111.0",
43
39
  "webpackbar": "^7.0.0"
44
40
  },
45
41
  "peerDependencies": {
46
- "@docusaurus/faster": "4.0.0-canary-6840",
42
+ "@docusaurus/faster": "4.0.0-canary-6842",
47
43
  "@types/html-minifier-terser": "^7.0.2"
48
44
  },
49
45
  "peerDependenciesMeta": {
@@ -57,5 +53,5 @@
57
53
  "engines": {
58
54
  "node": ">=24.21"
59
55
  },
60
- "gitHead": "b767143bc76b7747a9d1cc747dece7b06195a5c0"
56
+ "gitHead": "631fd51d00303096997d355ae6b6c525b0775c2c"
61
57
  }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ // A loader returning an empty module, used to ignore some imports
9
+ // Replaces the unmaintained null-loader package and its outdated dependencies
10
+ // See https://github.com/webpack-contrib/null-loader
11
+
12
+ export default function nullLoader(): string {
13
+ return '';
14
+ }
15
+
16
+ // Pitching short-circuits the loader chain: the file isn't even read
17
+ export function pitch(): string {
18
+ return '';
19
+ }
@@ -38,7 +38,7 @@ export async function createStyleLoadersFactory({
38
38
  },
39
39
  ]
40
40
  : // Ignore regular CSS files
41
- [{loader: require.resolve('null-loader')}];
41
+ [{loader: require.resolve('./nullLoader')}];
42
42
  }
43
43
 
44
44
  return [
package/src/minifyHtml.ts CHANGED
@@ -13,7 +13,7 @@ const SkipHtmlMinification = process.env.SKIP_HTML_MINIFICATION === 'true';
13
13
 
14
14
  export type HtmlMinifierType = 'swc' | 'terser';
15
15
 
16
- export type HtmlMinifierResult = {
16
+ type HtmlMinifierResult = {
17
17
  code: string;
18
18
  warnings: string[];
19
19
  };