Support older browsers (#674)
This commit is contained in:
14
package.json
14
package.json
@@ -20,18 +20,6 @@
|
||||
"engines": {
|
||||
"node": "20.11.1"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{ts,tsx,js,jsx}": "eslint --fix --cache"
|
||||
},
|
||||
@@ -43,6 +31,7 @@
|
||||
"@mui/icons-material": "^5.15.12",
|
||||
"@mui/material": "^5.15.12",
|
||||
"@mui/x-date-pickers": "^6.19.6",
|
||||
"@vitejs/plugin-legacy": "^5.3.2",
|
||||
"@vitejs/plugin-react-swc": "^3.6.0",
|
||||
"apollo-upload-client": "^17.0.0",
|
||||
"dayjs": "^1.11.10",
|
||||
@@ -93,6 +82,7 @@
|
||||
"lint-staged": "^15.2.2",
|
||||
"prettier": "^3.2.5",
|
||||
"syncyarnlock": "^1.0.19",
|
||||
"terser": "^5.29.2",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.4.2",
|
||||
"yargs": "^17.7.2"
|
||||
|
||||
@@ -10,6 +10,7 @@ import path from 'path';
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react-swc';
|
||||
import viteTsconfigPaths from 'vite-tsconfig-paths';
|
||||
import legacy from '@vitejs/plugin-legacy';
|
||||
|
||||
// TODO - switch to ESM - with Vite v5.x the CJS build is deprecated (https://vitejs.dev/guide/migration)
|
||||
|
||||
@@ -26,5 +27,16 @@ export default defineConfig(() => ({
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
},
|
||||
},
|
||||
plugins: [react(), viteTsconfigPaths()],
|
||||
plugins: [
|
||||
react(),
|
||||
viteTsconfigPaths(),
|
||||
legacy({
|
||||
modernPolyfills: [
|
||||
'es/array/to-spliced',
|
||||
'es/array/to-sorted',
|
||||
'es/array/find-last',
|
||||
'es/array/find-last-index',
|
||||
],
|
||||
}),
|
||||
],
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user