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

Parcel v2 is serving wrong index.html when there're multiple entry points #4740

Closed
balthild opened this issue Jun 16, 2020 · 3 comments · Fixed by #8957
Closed

Parcel v2 is serving wrong index.html when there're multiple entry points #4740

balthild opened this issue Jun 16, 2020 · 3 comments · Fixed by #8957

Comments

@balthild
Copy link

balthild commented Jun 16, 2020

🐛 bug report

If I have the followng directory structure

./a/index.html
./b/index.html
./c/ (no files under this dir)

and serving it with parcel v2. Visiting http://localhost:1234/b and http://localhost:1234/c gets ./a/index.html instead of the correct ones.

Related: #3996

🎛 Configuration (.babelrc, package.json, cli command)

yarn parcel ./**/*.html

🤔 Expected Behavior

Get ./b/index.html when visiting /b and a 404 error when visiting /c (since there's no ./index.html, it's not a SPA).

🌍 Your Environment

Software Version(s)
Parcel 2.0.0-alpha.3.2
Node v14.4.0
npm/Yarn 1.22.4
Operating System macOS 10.15.5
@DeMoorJasper
Copy link
Member

Have you tried using the nightly release of parcel yarn add parcel@nightly?

@balthild
Copy link
Author

I've just tried it. The behavior is the same.

@mischnic
Copy link
Member

The dev server should definitely behave more like a traditional web server. (and in the SPA case, use "a index.html in a parent folder" instead of "any index.html")

Somewhat related: #4429

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants