fix: "react" error running npm/npx distribution
Massimo Melina committed
May 5, 2023 at 10:33 UTC
e78496c3f5cda16c5e415378dde3c37f227af245
2 files changed
+2
-2
src/customHtml.ts
+1
-1
@@ -3,7 +3,7 @@ import events from './events'
3
import { prefix } from './misc'
4
import { customHeader } from './frontEndApis'
5
import { watchLoad } from './watchLoad'
6
-import { proxy } from 'valtio'
6
+import { proxy } from 'valtio/vanilla' // without /vanilla we trigger react dependency
7
import Dict = NodeJS.Dict
8
import { writeFile } from 'fs/promises'
9
src/serveGuiFiles.ts
+1
-1
@@ -19,7 +19,7 @@ import { ApiError } from './apiMiddleware'
19
import { join, extname } from 'path'
20
import { getOrSet, newObj, onlyTruthy } from './misc'
21
import { favicon, title } from './adminApis'
22
-import { subscribe } from 'valtio'
22
+import { subscribe } from 'valtio/vanilla'
23
import { customHtmlState, getSection } from './customHtml'
24
import _ from 'lodash'
25
import { defineConfig } from './config'