Skip to content

Commit

Permalink
Add useful comment for getBrowserslistQueries
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Oct 3, 2024
1 parent 1c48869 commit 8093a21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/docusaurus-faster/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ export function getSwcJsMinimizerOptions(): JsMinifyOptions {
};
}

// We need this because of Rspack built-in LightningCSS integration
// See https://github.com/orgs/browserslist/discussions/846
export function getBrowserslistQueries(): string[] {
// Not sure why browserslist has no direct method to retrieve queries
const configFile = browserslist.findConfigFile(process.cwd());
const queries = browserslist.loadConfig({path: configFile}) ?? [
const queries = browserslist.loadConfig({path: process.cwd()}) ?? [
...browserslist.defaults,
];
return queries;
Expand Down

0 comments on commit 8093a21

Please sign in to comment.