index.html
detection only works if the file is explicitly referenced.
#6850
Labels
Stale
Inactive issues
🐛 bug report
Links to
/folder1/
only serve the content of/folder1/index.html
if the file path to/folder1/index.html
is explicitly referenced elsewhere in the project.🎛 Configuration (.babelrc, package.json, cli command)
Suppose we have three folders, each containing an
index.html
file:Run:
🤔 Expected Behavior
Link #1 goes to
/folder1/
(e.g.http://localhost:1234/folder1/
) and serves the contents offolder1/index.html
.😯 Current Behavior
Link #1 goes to
/folder1/
but serves the root content. Clicking again goes to/folder1/folder1/
,/folder1/folder1/folder1/
, etc.💁 Possible Solution
Detect the
index.html
mapping in the graph calculation?At the moment, I'm able to use this workaround:
It seems that the first URL causes Parcel to recognize that
folder3
has an index file, and subsequently serves it when the visible link is clicked. It would be nice if something like this worked automatically.🔦 Context
I'm trying to convert https://github.com/cubing/cubing.js/ back to Parcel and this is breaking our links.
💻 Code Sample
See above.
🌍 Your Environment
Parcel 2.0.0-rc.0
npm 7.21.0
node v16.8.0
macOS 11.5.2
The text was updated successfully, but these errors were encountered: