HMR triggers full page load on component edit
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- nuxt, tailwindcss, typescript, vite
- 领域
- build-system, frontend, tooling
调研方向
Start with the StackBlitz reproduction and compare the HMR logs when the Tailwind module is installed versus absent. Check edits to pages/index.vue, components/not-used.vue, and utils/test.ts; done means unused component and TypeScript changes no longer trigger a full page reload.
由索引模型根据 Issue 内容生成。
描述
Environment
- Operating System:
Darwin - Node Version:
v20.11.0 - Nuxt Version:
3.12.3 - CLI Version:
3.12.0 - Nitro Version:
2.9.7 - Package Manager:
[email protected] - Builder:
- - User Config:
compatibilityDate,devtools,modules - Runtime Modules:
@nuxtjs/[email protected] - Build Modules:
-
Reproduction
https://stackblitz.com/edit/github-xdbpil?file=pages%2Findex.vue
Describe the bug
As soon as i install the nuxt tailwindcss module, the HMR triggers a page reload.
With tailwind module
[nuxt] builder:watch: 0.48ms
[nuxt] builder:watch: 0.521ms
vite:hmr [file change] components/not-used.vue +6s
ℹ page reload components/not-used.vue
Having a plain nuxt application, without tailwind installed will not trigger a page reload.
Without tailwind module
[nuxt] builder:watch: 0.434ms
[nuxt] builder:watch: 0.488ms
vite:hmr [file change] components/not-used.vue +11s
vite:hmr [no modules matched] components/not-used.vue +0ms
However, if you change files/components which are part of the current page, even with the tailwindcss plugin there is no complete page-reload:
With tailwind module + component is used in current page
vite:hmr [file change] components/not-used.vue +4s
[nuxt] builder:watch: 0.146ms
[nuxt] builder:watch: 0.181ms
vite:hmr [vue:update(template)] {MY_ROOT_DIR}/components/not-used.vue +1m
ℹ hmr update /components/not-used.vue, /node_modules/tailwindcss/tailwind.css
The same behaviour counts for .ts files. Changes within them will trigger a whole page reload, which does not happen without the @nuxtjs/tailwindcss module.
With tailwind module
vite:hmr [file change] utils/test.ts +9s
ℹ page reload utils/test.ts
Without tailwind module
[nuxt] builder:watch: 1.331ms
vite:hmr [file change] utils/test.ts +4s
vite:hmr [no modules matched] utils/test.ts +0ms
Additional context
No response
Logs
No response
- 主要语言
- TypeScript
- 星标
- 1.9k
- 派生
- 193
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nuxt-modules/tailwindcss 的其他 Issue
-
bug
难度 4/5 1-2 天 新手友好度 58/100
nuxt-modules/tailwindcss#1047 ·
-
Version 6未关闭bug
难度 4/5 3-5 天 新手友好度 35/100
nuxt-modules/tailwindcss#1042 ·
-
bug
难度 3/5 1-2 天 新手友好度 35/100
nuxt-modules/tailwindcss#1039 · 2 条评论 ·
-
bug
难度 3/5 1-2 天 新手友好度 45/100
nuxt-modules/tailwindcss#1034 · 1 条评论 ·
-
bug
难度 3/5 1-2 天 新手友好度 35/100
nuxt-modules/tailwindcss#1033 · 1 条评论 ·
查看 nuxt-modules/tailwindcss 的全部 Issue
相似的 Issue
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 75/100
lingdojo/kana-dojo#32018 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
paperclipai/paperclip#15751 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
BuilderIO/agent-native#7275 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复