Skip to content

Commit

Permalink
fix: entrypoint error when use custom index entry (#5845)
Browse files Browse the repository at this point in the history
  • Loading branch information
caohuilin authored Jun 18, 2024
1 parent 1c05b8b commit 413b27f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .changeset/heavy-spoons-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@modern-js/runtime': patch
---

fix: entrypoint error when use custom index entry

fix: 修复当使用自定义 index 入口时入口路径错误
3 changes: 3 additions & 0 deletions packages/runtime/plugin-runtime/src/router/cli/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ export const modifyEntrypoints = (
config: Record<string, any> = {},
) => {
return entrypoints.map(entrypoint => {
if (!entrypoint.isAutoMount) {
return entrypoint;
}
const isHasNestedRoutes = hasNestedRoutes(entrypoint.absoluteEntryDir!);
const isHasPages = hasPages(entrypoint.absoluteEntryDir!);
if (!isHasNestedRoutes && !isHasPages) {
Expand Down

0 comments on commit 413b27f

Please sign in to comment.