Skip to content

Commit

Permalink
fix: build ui for legacy clients (safari 12) #2818
Browse files Browse the repository at this point in the history
It may not render perfectly, but it should be usable
  • Loading branch information
Julusian committed Mar 26, 2024
1 parent 2cbe51e commit 257bae6
Show file tree
Hide file tree
Showing 3 changed files with 1,357 additions and 222 deletions.
14 changes: 2 additions & 12 deletions webui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@types/react-dom": "^18.2.21",
"@types/react-window": "^1.8.8",
"@types/sanitize-html": "^2.11.0",
"@vitejs/plugin-legacy": "^5.3.2",
"@vitejs/plugin-react": "^4.2.1",
"buffer": "^6.0.3",
"classnames": "^2.5.1",
Expand Down Expand Up @@ -60,6 +61,7 @@
"sanitize-html": "^2.12.1",
"sass": "^1.71.1",
"socket.io-client": "^4.7.4",
"terser": "^5.29.2",
"typescript": "~5.3.3",
"use-deep-compare": "^1.2.1",
"usehooks-ts": "^2.16.0",
Expand All @@ -79,17 +81,5 @@
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
4 changes: 4 additions & 0 deletions webui/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from 'vite'
import reactPlugin from '@vitejs/plugin-react'
import * as envCompatible from 'vite-plugin-env-compatible'
import legacyPlugin from '@vitejs/plugin-legacy'

const upstreamUrl = process.env.UPSTREAM_URL || '127.0.0.1:8000'

Expand Down Expand Up @@ -28,6 +29,9 @@ export default defineConfig({
envCompatible.default({
prefix: 'DEV',
}),
legacyPlugin({
targets: ['defaults', 'not IE 11', 'safari >= 12.1'],
}),
],
css: {
preprocessorOptions: {
Expand Down
Loading

0 comments on commit 257bae6

Please sign in to comment.