Skip to content

Commit

Permalink
Improves startup time by requiring specific caniuse files (#1492) (#1493
Browse files Browse the repository at this point in the history
)

* Improves startup time by requiring specific caniuse files (#1492)

* Update lib/browsers.js

Co-authored-by: Andrey Sitnik <[email protected]>

---------

Co-authored-by: Andrey Sitnik <[email protected]>
  • Loading branch information
Knagis and ai authored Mar 9, 2023
1 parent c5a86ab commit 48010ae
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion data/prefixes.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let unpack = require('caniuse-lite').feature
let unpack = require('caniuse-lite/dist/unpacker/feature')

function browsersSort(a, b) {
a = a.split(' ')
Expand Down
2 changes: 1 addition & 1 deletion lib/autoprefixer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
let browserslist = require('browserslist')
let { agents } = require('caniuse-lite')
let { agents } = require('caniuse-lite/dist/unpacker/agents')
let pico = require('picocolors')

let Browsers = require('./browsers')
Expand Down
2 changes: 1 addition & 1 deletion lib/browsers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
let browserslist = require('browserslist')
let agents = require('caniuse-lite').agents
let { agents } = require('caniuse-lite/dist/unpacker/agents')

let utils = require('./utils')

Expand Down
2 changes: 1 addition & 1 deletion lib/supports.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
let featureQueries = require('caniuse-lite/data/features/css-featurequeries.js')
let { feature } = require('caniuse-lite')
let feature = require('caniuse-lite/dist/unpacker/feature')
let { parse } = require('postcss')

let Browsers = require('./browsers')
Expand Down
2 changes: 1 addition & 1 deletion test/browsers.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
let { equal, is } = require('uvu/assert')
let { agents } = require('caniuse-lite')
let { agents } = require('caniuse-lite/dist/unpacker/agents')
let { join } = require('path')
let { test } = require('uvu')

Expand Down
2 changes: 1 addition & 1 deletion test/info.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
let { equal, match } = require('uvu/assert')
let browserslist = require('browserslist')
let { agents } = require('caniuse-lite')
let { agents } = require('caniuse-lite/dist/unpacker/agents')
let { test } = require('uvu')

let Browsers = require('../lib/browsers')
Expand Down
2 changes: 1 addition & 1 deletion test/prefixes.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
let { equal, is } = require('uvu/assert')
let { agents } = require('caniuse-lite')
let { agents } = require('caniuse-lite/dist/unpacker/agents')
let { parse } = require('postcss')
let { test } = require('uvu')

Expand Down

0 comments on commit 48010ae

Please sign in to comment.