Skip to content

Commit 4c64ba3

Browse files
authored
fix(FR-2135): auto-rebuild backend.ai-client-esm.ts on change (#5611)
1 parent 82945b2 commit 4c64ba3

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"build:react-only": "pnpm run --prefix ./react build:only",
2222
"server:p": "serve build/web",
2323
"server:d": "eval \"$(node scripts/dev-config.js env)\" && node scripts/dev-config.js update && HOST=$BAI_WEBUI_DEV_HOST PORT=$BAI_WEBUI_DEV_REACT_PORT PROXY=http://localhost:$BAI_WEBUI_DEV_WEBDEV_PORT pnpm --prefix ./react run start",
24-
"build:d": "eval \"$(node scripts/dev-config.js env)\" && node scripts/dev-config.js update && concurrently --kill-others -c \"auto\" --names \"react-relay,react\" \"cd react && pnpm run relay:watch\" \"HOST=$BAI_WEBUI_DEV_HOST BAI_WEBUI_DEV_PROXY= PORT=$BAI_WEBUI_DEV_REACT_PORT pnpm --prefix ./react run start\"",
24+
"build:d": "eval \"$(node scripts/dev-config.js env)\" && node scripts/dev-config.js update && concurrently --kill-others -c \"auto\" --names \"tsc,react-relay,react\" \"tsc --watch --preserveWatchOutput\" \"cd react && pnpm run relay:watch\" \"HOST=$BAI_WEBUI_DEV_HOST BAI_WEBUI_DEV_PROXY= PORT=$BAI_WEBUI_DEV_REACT_PORT pnpm --prefix ./react run start\"",
2525
"electron:d": "electron build/electron-app --dev",
2626
"electron:d:hmr": "LIVE_DEBUG=1 electron build/electron-app --dev",
2727
"relay": "relay-compiler",

react/craco.config.cjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,10 @@ module.exports = {
294294
ignored: [
295295
// Ignore node_modules (standard exclusion for performance)
296296
'**/node_modules/**',
297-
// Ignore static assets that are served directly by webpack-dev-server
298-
// and are not part of the webpack module graph. These don't need
299-
// webpack to watch them; the dev server serves them as static files.
300-
path.resolve(__dirname, '../dist/**'),
297+
// Note: dist/ is intentionally NOT ignored because
298+
// backend.ai-client-esm.js (resolved via webpack alias) is part of
299+
// the module graph and needs to trigger HMR when recompiled by
300+
// `tsc --watch` (run concurrently in the build:d script).
301301
path.resolve(__dirname, '../resources/**'),
302302
path.resolve(__dirname, '../manifest/**'),
303303
],

0 commit comments

Comments
 (0)