@docusaurus/faster
Advanced tools
Comparing version 0.0.0-6083 to 0.0.0-6088
@@ -7,2 +7,3 @@ /** | ||
*/ | ||
import * as lightningcss from 'lightningcss'; | ||
import type { RuleSetRule } from 'webpack'; | ||
@@ -13,3 +14,6 @@ import type { JsMinifyOptions } from '@swc/core'; | ||
}): RuleSetRule; | ||
export declare function getSwcJsMinifierOptions(): JsMinifyOptions; | ||
export declare function getSwcJsMinimizerOptions(): JsMinifyOptions; | ||
type LightningCssMinimizerOptions = Omit<lightningcss.TransformOptions<never>, 'filename' | 'code'>; | ||
export declare function getLightningCssMinimizerOptions(): LightningCssMinimizerOptions; | ||
export {}; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -10,3 +10,7 @@ "use strict"; | ||
exports.getSwcJsLoaderFactory = getSwcJsLoaderFactory; | ||
exports.getSwcJsMinifierOptions = getSwcJsMinifierOptions; | ||
exports.getSwcJsMinimizerOptions = getSwcJsMinimizerOptions; | ||
exports.getLightningCssMinimizerOptions = getLightningCssMinimizerOptions; | ||
const tslib_1 = require("tslib"); | ||
const lightningcss = tslib_1.__importStar(require("lightningcss")); | ||
const browserslist_1 = tslib_1.__importDefault(require("browserslist")); | ||
function getSwcJsLoaderFactory({ isServer, }) { | ||
@@ -38,3 +42,3 @@ return { | ||
// See core minification.ts | ||
function getSwcJsMinifierOptions() { | ||
function getSwcJsMinimizerOptions() { | ||
return { | ||
@@ -55,2 +59,6 @@ ecma: 2020, | ||
} | ||
function getLightningCssMinimizerOptions() { | ||
const queries = (0, browserslist_1.default)(); | ||
return { targets: lightningcss.browserslistToTargets(queries) }; | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@docusaurus/faster", | ||
"version": "0.0.0-6083", | ||
"version": "0.0.0-6088", | ||
"description": "Docusaurus experimental package exposing new modern dependencies to make the build faster.", | ||
@@ -22,2 +22,4 @@ "main": "./lib/index.js", | ||
"@swc/core": "^1.7.14", | ||
"browserslist": "^4.24.0", | ||
"lightningcss": "^1.27.0", | ||
"swc-loader": "^0.2.6", | ||
@@ -32,3 +34,3 @@ "webpack": "^5.88.1" | ||
}, | ||
"gitHead": "474967f4f49da90a1fca9f9034b0c054c5e29c7f" | ||
"gitHead": "cb740649f8679ddbafa4d4ffb2b9b428412d86bc" | ||
} |
@@ -8,2 +8,4 @@ /** | ||
import * as lightningcss from 'lightningcss'; | ||
import browserslist from 'browserslist'; | ||
import type {RuleSetRule} from 'webpack'; | ||
@@ -43,3 +45,3 @@ import type {JsMinifyOptions} from '@swc/core'; | ||
// See core minification.ts | ||
export function getSwcJsMinifierOptions(): JsMinifyOptions { | ||
export function getSwcJsMinimizerOptions(): JsMinifyOptions { | ||
return { | ||
@@ -60,1 +62,14 @@ ecma: 2020, | ||
} | ||
// LightningCSS doesn't expose any type for css-minimizer-webpack-plugin setup | ||
// So we derive it ourselves | ||
// see https://lightningcss.dev/docs.html#with-webpack | ||
type LightningCssMinimizerOptions = Omit< | ||
lightningcss.TransformOptions<never>, | ||
'filename' | 'code' | ||
>; | ||
export function getLightningCssMinimizerOptions(): LightningCssMinimizerOptions { | ||
const queries = browserslist(); | ||
return {targets: lightningcss.browserslistToTargets(queries)}; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8067
143
6
+ Addedbrowserslist@^4.24.0
+ Addedlightningcss@^1.27.0
+ Addeddetect-libc@1.0.3(transitive)
+ Addedlightningcss@1.28.2(transitive)
+ Addedlightningcss-darwin-arm64@1.28.2(transitive)
+ Addedlightningcss-darwin-x64@1.28.2(transitive)
+ Addedlightningcss-freebsd-x64@1.28.2(transitive)
+ Addedlightningcss-linux-arm-gnueabihf@1.28.2(transitive)
+ Addedlightningcss-linux-arm64-gnu@1.28.2(transitive)
+ Addedlightningcss-linux-arm64-musl@1.28.2(transitive)
+ Addedlightningcss-linux-x64-gnu@1.28.2(transitive)
+ Addedlightningcss-linux-x64-musl@1.28.2(transitive)
+ Addedlightningcss-win32-arm64-msvc@1.28.2(transitive)
+ Addedlightningcss-win32-x64-msvc@1.28.2(transitive)