Skip to content

Commit 4f3b745

Browse files
authored
StatsHouse UI: rsbuild and update deps (#2136)
1 parent 6d2632c commit 4f3b745

File tree

13 files changed

+11964
-16263
lines changed

13 files changed

+11964
-16263
lines changed

statshouse-ui/env.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
66

77
interface ImportMetaEnv {
8-
readonly VITE_PROXY: string;
98
readonly REACT_APP_PROXY: string;
109
readonly REACT_APP_PROXY_COOKIE: string;
1110
readonly REACT_APP_CONFIG: string;

statshouse-ui/eslint.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,7 @@ export default tseslint.config({
8383
allowSeparatedGroups: false,
8484
},
8585
],
86+
'react-hooks/set-state-in-effect': ['off'],
87+
'react-hooks/refs': ['off'],
8688
},
8789
});
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<% if (env.PROD) { %>
4+
<% if (import.meta.env.PROD) { %>
55
<meta
66
http-equiv="Content-Security-Policy"
77
content="default-src 'none'; base-uri 'none'; form-action 'none'; img-src 'self' data: blob:; font-src 'self'; manifest-src 'self'; connect-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self';"
@@ -18,12 +18,14 @@
1818
<link rel="apple-touch-icon" href="/logo192.png" />
1919
<link rel="manifest" href="/manifest.json" />
2020
<title>StatsHouse UI</title>
21+
22+
<% if (import.meta.env.PROD) { %>
2123
<meta name="build-version" content="%REACT_APP_BUILD_VERSION%" />
22-
<% if (env.PROD) { %>
2324
<meta name="settings" content="{{.Settings}}" />
2425
<% } else { %>
25-
<meta name="settings" content="%REACT_APP_CONFIG%" />
26-
<% } %> <% if (env.PROD) { %><!--{{ if .OpenGraph }}-->
26+
<meta name="build-version" content="<%= import.meta.env.REACT_APP_BUILD_VERSION ?? 'dev' %>" />
27+
<meta name="settings" content="<%= import.meta.env.REACT_APP_CONFIG %>" />
28+
<% } %> <% if (import.meta.env.PROD) { %><!--{{ if .OpenGraph }}-->
2729
<meta property="og:title" content="{{.OpenGraph.Title}}" />
2830
<meta property="og:image" content="{{.OpenGraph.Image}}" />
2931
<meta property="og:image:width" content="{{.OpenGraph.ImageWidth}}" />
@@ -33,6 +35,5 @@
3335
<body>
3436
<noscript>You need to enable JavaScript to run StatsHouse UI.</noscript>
3537
<div id="root"></div>
36-
<script type="module" src="/src/index.tsx"></script>
3738
</body>
3839
</html>

0 commit comments

Comments
 (0)