Skip to content

Commit

Permalink
✨ Overrides useragent
Browse files Browse the repository at this point in the history
  • Loading branch information
kingyue737 committed Sep 4, 2022
1 parent 478f39b commit bd1b8fa
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 13 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ https://github.com/browserslist/browserslist-useragent-regexp#why

Let [Vite](https://github.com/vitejs/vite) transform and bundle for you and no need to run CLI every time you change browserslist.

`browserslist-useragent-regexp` and its dependency [`useragent`](https://github.com/3rd-Eden/useragent) are no longer actively maintained. This plugin will patch and override deprecated dependencies.

## Virtual Module

Virtual module `virtual:supported-browsers` exposes two variables returned by the following two methods of `browserslist-useragent-regexp` whose arguments are passed from plugin's [options](#options):
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.3",
"description": "A utility vite plugin to compile browserslist query to a RegExp to test browser useragent.",
"author": "Yue JIN <[email protected]>",
"packageManager": "pnpm@7.6.0",
"packageManager": "pnpm@7.10.0",
"engines": {
"node": ">=14"
},
Expand Down Expand Up @@ -54,5 +54,10 @@
},
"peerDependencies": {
"vite": "^2.5.0 || ^3.0.0"
},
"pnpm": {
"overrides": {
"useragent": "npm:@kingyue/useragent@^2.4.0"
}
}
}
Loading

0 comments on commit bd1b8fa

Please sign in to comment.