Parcel 2 improperly serves entry files named other than index.html
See original GitHub issue🐛 bug report
Parcel 2 improperly serves entry files named other than index.html.
If I run cli with parcel src/entry/popup/popup.html --open
Shows 404 Not found instead of åctual html.
If I rename popup.html to index.html and then run cli with parcel src/entry/popup/index.html --open - all is good.
🎛 Configuration (.babelrc, package.json, cli command)
.babelrc - I dont have
.parcelrc:
{
"extends": "@parcel/config-default",
"transformers": {
"*.{ts,tsx}": ["@parcel/transformer-typescript-tsc"]
}
}
🤔 Expected Behavior
Should accept any entry file name
😯 Current Behavior
See bug description.
💁 Possible Solution
🔦 Context
Just building a simple html.
💻 Code Sample
src/entry/popup/popup.html
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
</head>
<body>
<div id="ExtnPopup">This is the popup UI</div>
<script src="./popup.ts"></script>
</body>
</html>
src/entry/popup/popup.ts
// empty
🌍 Your Environment
| Software | Version(s) |
|---|---|
| Parcel | ^2.0.0-nightly.562 |
| Parcel | ^2.0.0-beta.1 |
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
deploying problem with multiple html files. Parcel
with 1 entry point, it goes all right, but I want multiple HTML files. I've searched online commands like: "build:client": "parcel build client/ ......
Read more >Package management basics - Learn web development | MDN
Parcel expects an index.html and an index.js file to work with, but otherwise it is very unopinionated about how you structure your project....
Read more >CSS - Parcel
If two CSS files define the same class names, ids, custom properties, @keyframes , etc., they will potentially clash and overwrite each other....
Read more >Zero Config JavaScript App Prototyping with ParcelJS - Auth0
Learn how to quickly prototype JavaScript apps using ParcelJS and see how Parcel's Hot Module Replacement and dev servers work.
Read more >How to Change your Default Index Page in the htaccess file
The default order of index file names our particular servers look through is index.htm, index.html, index.php, and finally default.htm.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

That’s a workaround; we need a fix.
I had this same regression with Parcel 2. I simply added a plugin which would rewrite the output:
.parcelrc
package.json