Skip to content

Commit c483327

Browse files
update
1 parent b77e64c commit c483327

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

ui/.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ PROD_PORT=5000
99
PROD_HOST=localhost
1010
PUBLIC_PROD_API_HOST=http://localhost:5000
1111
# framework webpack | vite
12-
FRAMEWORK=webpack
12+
FRAMEWORK=vite
1313
SWC=false
1414
# feature only for webpack framework
1515
ESBUILD=false
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { createState, withActions } from "reactivity-store";
22

33
export const useLoading = createState(
4-
withActions(() => ({ loading: false }), { generateActions: (state) => ({ setLoading: (s: boolean) => (state.loading = s) }) })
4+
withActions(() => ({ loading: false }), { generateActions: (state) => ({ setLoading: (s: boolean) => (state.loading = s) }) }),
5+
{ withNamespace: "useLoading" }
56
);

ui/src/server/middleware/renderPage/middleware/loadAsset.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ export const loadAsset: Middleware = (next) => async (args) => {
3333
type: "module",
3434
dangerouslySetInnerHTML: {
3535
__html: `
36-
// react refresh injected
37-
import RefreshRuntime from "/@react-refresh"
38-
RefreshRuntime.injectIntoGlobalHook(window)
39-
window.$RefreshReg$ = () => {}
40-
window.$RefreshSig$ = () => (type) => type
41-
window.__vite_plugin_react_preamble_installed__ = true
36+
// react refresh injected
37+
import RefreshRuntime from "/@react-refresh"
38+
RefreshRuntime.injectIntoGlobalHook(window)
39+
window.$RefreshReg$ = () => {}
40+
window.$RefreshSig$ = () => (type) => type
41+
window.__vite_plugin_react_preamble_installed__ = true
4242
`,
4343
},
4444
},

0 commit comments

Comments
 (0)