Skip to content
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

fix(#224): 修复importx导致的HMR失效问题,关闭缓存 #225

Merged
merged 6 commits into from
Feb 14, 2025

Conversation

Groupguanfang
Copy link
Contributor

closes #224

@muxiangqiu
Copy link
Member

muxiangqiu commented Feb 13, 2025

Clipboard_Screenshot_1739447589

这里需要改一下

Copy link
Member

@muxiangqiu muxiangqiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看看

@@ -70,7 +70,10 @@ async function attachBackendServer(ctx: ConfigurationContext, callback: Callback
while (true) {
if (fs.existsSync(entryPath)) {
mountRuntimeModuleCaches();
return importx(entryPath, __filename);
return importx(entryPath, {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里我理解不需要 importx,因为这里的文件都是编译过的

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那就直接改成createRequire🤔

@muxiangqiu muxiangqiu merged commit 26b9d5f into cellbang:main Feb 14, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HMR 貌似无效,修改代码不会生效
3 participants