Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/sour-cobras-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@modern-js/app-tools': patch
---

fix: should only watch file-based routes changes
fix: 只有基于文件的路由(约定式路由)需要被监听变化
3 changes: 2 additions & 1 deletion packages/solutions/app-tools/src/analyze/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ export default ({

pagesDir = entrypoints
.map(point => point.entry)
.filter(Boolean)
// should only watch file-based routes
.filter(entry => entry && !path.extname(entry))
.concat(nestedRouteEntries);

originEntrypoints = cloneDeep(entrypoints);
Expand Down