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

cannot dev or preview a page, if the page filename contain 'index', eg. e-index.astro #10850

Closed
1 task
jasper2virtual opened this issue Apr 23, 2024 · 2 comments · Fixed by #10979
Closed
1 task
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)

Comments

@jasper2virtual
Copy link

Astro Info

Astro                    v4.6.3
Node                     v18.18.2
System                   Windows (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

I create a page e-index.astro, and the astro config is build.format:"preserve"

In dev mode or preview mode, the 'e-index.html' page cannot found. But it can build successfully.

sample code :
https://github.com/jasper2virtual/astroissue/tree/main/src/pages

What's the expected result?

in dev mode, to load the page e-index.html in browser

Link to Minimal Reproducible Example

n/a

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Apr 23, 2024
@matthewp matthewp added needs repro Issue needs a reproduction and removed needs triage Issue needs to be triaged labels Apr 23, 2024
Copy link
Contributor

Hello @jasper2virtual. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs repro will be closed if they have no activity within 3 days.

@jasper2virtual
Copy link
Author

Yes, I have a GitHub repo, that can reproduce the problem. Here it is https://github.com/jasper2virtual/astroissue
This is a Astrojs project, you can reproduce the problem :

  1. npm run dev
  2. use browser to visit http://localhost:4321/e-index.html
  3. Then the browser show 404 error
image
  1. And it is weird that it show the page at http://localhost:4321/e-index/index.html
image
  1. But the e-index.html can be built successfully, after 'npm run build'
image image image

@matthewp matthewp added - P3: minor bug An edge case that only affects very specific usage (priority) and removed needs repro Issue needs a reproduction labels Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants