@docusaurus/faster 0.0.0-6096 → 0.0.0-6098
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/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -1
- package/package.json +4 -3
- package/src/index.ts +5 -0
package/lib/index.d.ts
CHANGED
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import * as lightningcss from 'lightningcss';
|
|
8
|
+
import { minify as swcHtmlMinifier } from '@swc/html';
|
|
8
9
|
import type { RuleSetRule } from 'webpack';
|
|
9
10
|
import type { JsMinifyOptions } from '@swc/core';
|
|
11
|
+
export declare function getSwcHtmlMinifier(): typeof swcHtmlMinifier;
|
|
10
12
|
export declare function getSwcJsLoaderFactory({ isServer, }: {
|
|
11
13
|
isServer: boolean;
|
|
12
14
|
}): RuleSetRule;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,YAAY,MAAM,cAAc,CAAC;AAE7C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,WAAW,CAAC;AAE/C,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,OAAO,CAAC;CACnB,GAAG,WAAW,CAqBd;AAMD,wBAAgB,wBAAwB,IAAI,eAAe,CAe1D;AAKD,KAAK,4BAA4B,GAAG,IAAI,CACtC,YAAY,CAAC,gBAAgB,CAAC,KAAK,CAAC,EACpC,UAAU,GAAG,MAAM,CACpB,CAAC;AAEF,wBAAgB,+BAA+B,IAAI,4BAA4B,CAG9E"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,YAAY,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAC,MAAM,IAAI,eAAe,EAAC,MAAM,WAAW,CAAC;AACpD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,WAAW,CAAC;AAE/C,wBAAgB,kBAAkB,IAAI,OAAO,eAAe,CAE3D;AAED,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,OAAO,CAAC;CACnB,GAAG,WAAW,CAqBd;AAMD,wBAAgB,wBAAwB,IAAI,eAAe,CAe1D;AAKD,KAAK,4BAA4B,GAAG,IAAI,CACtC,YAAY,CAAC,gBAAgB,CAAC,KAAK,CAAC,EACpC,UAAU,GAAG,MAAM,CACpB,CAAC;AAEF,wBAAgB,+BAA+B,IAAI,4BAA4B,CAG9E"}
|
package/lib/index.js
CHANGED
|
@@ -6,12 +6,17 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.getSwcHtmlMinifier = getSwcHtmlMinifier;
|
|
9
10
|
exports.getSwcJsLoaderFactory = getSwcJsLoaderFactory;
|
|
10
11
|
exports.getSwcJsMinimizerOptions = getSwcJsMinimizerOptions;
|
|
11
12
|
exports.getLightningCssMinimizerOptions = getLightningCssMinimizerOptions;
|
|
12
13
|
const tslib_1 = require("tslib");
|
|
13
14
|
const lightningcss = tslib_1.__importStar(require("lightningcss"));
|
|
14
15
|
const browserslist_1 = tslib_1.__importDefault(require("browserslist"));
|
|
16
|
+
const html_1 = require("@swc/html");
|
|
17
|
+
function getSwcHtmlMinifier() {
|
|
18
|
+
return html_1.minify;
|
|
19
|
+
}
|
|
15
20
|
function getSwcJsLoaderFactory({ isServer, }) {
|
|
16
21
|
return {
|
|
17
22
|
loader: require.resolve('swc-loader'),
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAQH,gDAEC;AAED,sDAyBC;AAMD,4DAeC;AAUD,0EAGC;;AArED,mEAA6C;AAC7C,wEAAwC;AACxC,oCAAoD;AAIpD,SAAgB,kBAAkB;IAChC,OAAO,aAAe,CAAC;AACzB,CAAC;AAED,SAAgB,qBAAqB,CAAC,EACpC,QAAQ,GAGT;IACC,OAAO;QACL,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC;QACrC,OAAO,EAAE;YACP,GAAG,EAAE;gBACH,MAAM,EAAE;oBACN,MAAM,EAAE,YAAY;oBACpB,GAAG,EAAE,IAAI;iBACV;gBACD,SAAS,EAAE;oBACT,KAAK,EAAE;wBACL,OAAO,EAAE,WAAW;qBACrB;iBACF;gBACD,MAAM,EAAE,QAAQ;aACjB;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK;aACpC;SACF;KACF,CAAC;AACJ,CAAC;AAED,yDAAyD;AACzD,8EAA8E;AAC9E,gFAAgF;AAChF,2BAA2B;AAC3B,SAAgB,wBAAwB;IACtC,OAAO;QACL,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE;YACR,IAAI,EAAE,CAAC;SACR;QACD,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE;YACN,IAAI,EAAE,CAAC;YACP,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,IAAI;SACjB;KACF,CAAC;AACJ,CAAC;AAUD,SAAgB,+BAA+B;IAC7C,MAAM,OAAO,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC/B,OAAO,EAAC,OAAO,EAAE,YAAY,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAC,CAAC;AAChE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/faster",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-6098",
|
|
4
4
|
"description": "Docusaurus experimental package exposing new modern dependencies to make the build faster.",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@swc/core": "^1.7.
|
|
21
|
+
"@swc/core": "^1.7.28",
|
|
22
|
+
"@swc/html": "^1.7.28",
|
|
22
23
|
"browserslist": "^4.24.0",
|
|
23
24
|
"lightningcss": "^1.27.0",
|
|
24
25
|
"swc-loader": "^0.2.6",
|
|
@@ -30,5 +31,5 @@
|
|
|
30
31
|
"peerDependencies": {
|
|
31
32
|
"@docusaurus/types": "*"
|
|
32
33
|
},
|
|
33
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "d0a89b89c2ace47f7e76829fbf41681cde932bb9"
|
|
34
35
|
}
|
package/src/index.ts
CHANGED
|
@@ -7,9 +7,14 @@
|
|
|
7
7
|
|
|
8
8
|
import * as lightningcss from 'lightningcss';
|
|
9
9
|
import browserslist from 'browserslist';
|
|
10
|
+
import {minify as swcHtmlMinifier} from '@swc/html';
|
|
10
11
|
import type {RuleSetRule} from 'webpack';
|
|
11
12
|
import type {JsMinifyOptions} from '@swc/core';
|
|
12
13
|
|
|
14
|
+
export function getSwcHtmlMinifier(): typeof swcHtmlMinifier {
|
|
15
|
+
return swcHtmlMinifier;
|
|
16
|
+
}
|
|
17
|
+
|
|
13
18
|
export function getSwcJsLoaderFactory({
|
|
14
19
|
isServer,
|
|
15
20
|
}: {
|