Skip to content

Commit

Permalink
Update and use browserslist #1379
Browse files Browse the repository at this point in the history
  • Loading branch information
joelvdavies committed Mar 21, 2024
1 parent bf9dce6 commit 505728c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 6 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"@types/redux-logger": "3.0.8",
"@vitejs/plugin-react": "^4.2.1",
"axios": "1.6.1",
"browserslist": "^4.23.0",
"browserslist-to-esbuild": "^2.1.1",
"connected-react-router": "6.9.3",
"cookie-parser": "1.4.5",
"eslint-config-prettier": "9.1.0",
Expand Down Expand Up @@ -85,7 +87,6 @@
"browserslist": [
">0.2%",
"not dead",
"not ie <= 10",
"not op_mini all"
],
"devDependencies": {
Expand Down Expand Up @@ -120,4 +121,4 @@
"wait-on": "7.2.0"
},
"packageManager": "[email protected]"
}
}
5 changes: 5 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import react from '@vitejs/plugin-react';
import browserslistToEsbuild from 'browserslist-to-esbuild';
import { PluginOption, defineConfig, loadEnv } from 'vite';

/* See https://stackoverflow.com/questions/69626090/how-to-watch-public-directory-in-vite-project-for-hot-reload allows
Expand Down Expand Up @@ -39,6 +40,10 @@ export default defineConfig(({ mode }) => {
preview: {
port: 5001,
},
build: {
// Use browserslist config
target: browserslistToEsbuild(),
},
test: {
globals: true,
environment: 'jsdom',
Expand Down
30 changes: 26 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2689,7 +2689,20 @@ __metadata:
languageName: node
linkType: hard

"browserslist@npm:^4.22.2":
"browserslist-to-esbuild@npm:^2.1.1":
version: 2.1.1
resolution: "browserslist-to-esbuild@npm:2.1.1"
dependencies:
meow: "npm:^13.0.0"
peerDependencies:
browserslist: "*"
bin:
browserslist-to-esbuild: cli/index.js
checksum: 10/5e91b23ba5ac47412b7456bbb74ee11b35d1083163e9e8e001e48f3a975c65758a4559ab532812d8518877a1d8f68c5b649b88a08722b9543b38e633e6943f7d
languageName: node
linkType: hard

"browserslist@npm:^4.22.2, browserslist@npm:^4.23.0":
version: 4.23.0
resolution: "browserslist@npm:4.23.0"
dependencies:
Expand Down Expand Up @@ -2819,9 +2832,9 @@ __metadata:
linkType: hard

"caniuse-lite@npm:^1.0.30001587":
version: 1.0.30001597
resolution: "caniuse-lite@npm:1.0.30001597"
checksum: 10/44a268113faeee51e249cbcb3924dc3765f26cd527a134e3bb720ed20d50abd8b9291500a88beee061cc03ae9f15ddc9045d57e30d25a98efeaff4f7bb8965c1
version: 1.0.30001599
resolution: "caniuse-lite@npm:1.0.30001599"
checksum: 10/c9a5ad806fc0d446e4f995d551b840d8fdcbe97958b7f83ff7a255a8ef5e40ca12ca1a508c66b3ab147e19eef932d28772d205c046500dd0740ea9dfb602e2e1
languageName: node
linkType: hard

Expand Down Expand Up @@ -6541,6 +6554,13 @@ __metadata:
languageName: node
linkType: hard

"meow@npm:^13.0.0":
version: 13.2.0
resolution: "meow@npm:13.2.0"
checksum: 10/4eff5bc921fed0b8a471ad79069d741a0210036d717547d0c7f36fdaf84ef7a3036225f38b6a53830d84dc9cbf8b944b097fde62381b8b5b215119e735ce1063
languageName: node
linkType: hard

"merge-descriptors@npm:1.0.1":
version: 1.0.1
resolution: "merge-descriptors@npm:1.0.1"
Expand Down Expand Up @@ -8251,6 +8271,8 @@ __metadata:
"@vitest/coverage-v8": "npm:^1.3.1"
axios: "npm:1.6.1"
axios-mock-adapter: "npm:1.22.0"
browserslist: "npm:^4.23.0"
browserslist-to-esbuild: "npm:^2.1.1"
concurrently: "npm:8.2.0"
connected-react-router: "npm:6.9.3"
cookie-parser: "npm:1.4.5"
Expand Down

0 comments on commit 505728c

Please sign in to comment.