diff --git a/package.json b/package.json index de2b33e32..29a8a196c 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,6 @@ "browserslist": [ ">0.2%", "not dead", - "not ie <= 10", "not op_mini all" ], "devDependencies": { @@ -103,6 +102,8 @@ "@typescript-eslint/parser": "7.0.2", "@vitest/coverage-v8": "^1.3.1", "axios-mock-adapter": "1.22.0", + "browserslist": "^4.23.0", + "browserslist-to-esbuild": "^2.1.1", "concurrently": "8.2.0", "cors": "2.8.5", "cross-env": "7.0.3", diff --git a/vite.config.ts b/vite.config.ts index 8ea6f7196..ec2acfdcc 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -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 @@ -39,6 +40,10 @@ export default defineConfig(({ mode }) => { preview: { port: 5001, }, + build: { + // Use browserslist config + target: browserslistToEsbuild(), + }, test: { globals: true, environment: 'jsdom', diff --git a/yarn.lock b/yarn.lock index 319dda449..4b38687ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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: @@ -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 @@ -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" @@ -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"