-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Fix #4429: dev server entry detection #4638
Conversation
|
I wasn't sure on how to use the |
); | ||
bundle.filePath.endsWith('.html'), | ||
); | ||
const htmlBundle = htmlBundles.length === 1 ? htmlBundles[0] : undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to get a test for this.
} | ||
}, | ||
); | ||
bundle.filePath.endsWith('.html'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bundle.filePath.endsWith('.html'), | |
bundle.type === '.html', |
I will check all your comments and add a few tests. But now I'm looking at existing tests I broke. It seems all html bundles have |
I see.
Per suggest I updated logic from "serve first index.html" to "serve any single HTML bundle". The problem is there are two tests failing with multiple HTML bundles where it serves a 404 now instead of the first https://github.com/parcel-bundler/parcel/blob/v2/packages/core/integration-tests/test/server.js#L135 Both use the fixtures at |
↪️ Pull Request
Fixes #4429.
💻 Examples
Before the entry detection served the first
index.html
bundle it found.This would yield a 404 when running any other html file.
I updated the logic, as suggested, to serve any single HTML entry.
🚨 Test instructions
I didn't see any tests for the dev server. Let me know if or where I can do so.
✔️ PR Todo