From 9d028d26aa925d4a17f981259545cf9191ca49e7 Mon Sep 17 00:00:00 2001 From: Andrey Sitnik Date: Wed, 25 Sep 2024 22:28:47 +0200 Subject: [PATCH] Use public API of Browserslist (#39) --- lib/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index 76c0a39..0c207a7 100644 --- a/lib/index.js +++ b/lib/index.js @@ -2,7 +2,6 @@ const path = require("path"); const browserslist = require("browserslist"); -const browserslistNode = require("browserslist/node"); const { version, homepage } = require("../package.json"); const flatTypeScriptConfigs = {}; const createRule = (name, browserstring, description, { ts = null } = {}) => { @@ -25,7 +24,7 @@ const createRule = (name, browserstring, description, { ts = null } = {}) => { ), create(context) { let browsers = browserslist(browserstring); - const config = browserslistNode.findConfig(path.dirname( + const config = browserslist.findConfig(path.dirname( context.filename ?? context.getFilename() )) || { defaults: "defaults",