-
Notifications
You must be signed in to change notification settings - Fork 224
feat: Convert CRXJS HMR from filesystem-based to WebSocket-based #993 #1012
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
raven finished: 51510 opus initial implementation sort of working almost working moving forward
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This is an automated message. Please do not reply to this comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
project is not running. Ghost deps, missing devDeps.
Below patch fixes the deps, but i couldnt make it run
diff --git forkSrcPrefix/packages/vite-plugin/hmr-code/package.json forkDstPrefix/packages/vite-plugin/hmr-code/package.json
index c9789d9f00af6a6ac60ff72aab92706bf8fb6b26..44063a4e1b2f482fe131f5ebc3e5facd3374bf16 100644
--- forkSrcPrefix/packages/vite-plugin/hmr-code/package.json
+++ forkDstPrefix/packages/vite-plugin/hmr-code/package.json
@@ -23,8 +23,6 @@
"type-check": "tsc --noEmit"
},
"devDependencies": {
- "@extension/env": "workspace:*",
- "@extension/tsconfig": "workspace:*",
"@rollup/plugin-sucrase": "^5.0.2",
"@types/ws": "^8.18.1",
"esbuild": "^0.25.4",
@@ -32,5 +30,8 @@
"rollup": "^4.41.0",
"ts-node": "^10.9.2",
"ws": "^8.18.2"
+ },
+ "dependencies": {
+ "tsx": "^4.19.4"
}
}
diff --git forkSrcPrefix/packages/vite-plugin/hmr-code/lib/consts.ts forkDstPrefix/packages/vite-plugin/hmr-code/lib/consts.ts
index 8166866e90e79c9388671dea6b95ec83ffe2a131..64f92604fd6822fa3ccacc4b189df2ffd0556e11 100644
--- forkSrcPrefix/packages/vite-plugin/hmr-code/lib/consts.ts
+++ forkDstPrefix/packages/vite-plugin/hmr-code/lib/consts.ts
@@ -1,4 +1,4 @@
-export const LOCAL_RELOAD_SOCKET_PORT = 8081;
+export const LOCAL_RELOAD_SOCKET_PORT = 5173;
export const LOCAL_RELOAD_SOCKET_URL = `ws://localhost:${LOCAL_RELOAD_SOCKET_PORT}`;
export const DO_UPDATE = 'do_update';
"type-check": "tsc --noEmit" | ||
}, | ||
"devDependencies": { | ||
"@extension/env": "workspace:*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
monorepo does not have such a project. Build fails
cd packages/vite-plugin/hmr-code; pnpm i
].flat() | ||
} | ||
|
||
export const chromeExtension = crx | ||
|
||
export { defineDynamicResource, defineManifest } from './defineManifest' | ||
export { allFilesReady, fileReady as filesReady } from './fileWriter' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now the packages/vite-plugin/tests/runners.ts
does not work because there is no export anymore
} | ||
|
||
private handleOpen = () => { | ||
console.log('[vite] connected to HMR server') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swap console logs with import debug from 'src/debug' so that the logs are visible when running
DEBUG=* vite --clearScreen=false`
e2e tests blew up - 2 hours execution : D |
related to #993
reference:
https://github.com/Jonghakseo/chrome-extension-boilerplate-react-vite