You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to use Ecstatic (via http-server) to serve Angular's ES2015 modules. This means serving with .js default extension. I had problems because they have some files named e.g. metadata.js that also have a corresponding directory with the same name. Attempting to import ./metadata resolves to the directory, but since there is no index.js inside it, and showDir is false, this results in a 404. In this case, I think Ecstatic should fall back to serving the document with the default extension, if one exists.
I.e the proposed logic would be this:
If a file with the exact path exists: Serve it.
Else if a directory with the exact path exists:
If the directory has an index document: Serve it.
Else if the showDir: true: Show file list.
Else if a file with default extension exists: Serve it.
Else if 404.html exists: Serve it.
Else serve 404.
The text was updated successfully, but these errors were encountered:
I was trying to use Ecstatic (via http-server) to serve Angular's ES2015 modules. This means serving with
.js
default extension. I had problems because they have some files named e.g.metadata.js
that also have a corresponding directory with the same name. Attempting to import./metadata
resolves to the directory, but since there is noindex.js
inside it, andshowDir
isfalse
, this results in a 404. In this case, I think Ecstatic should fall back to serving the document with the default extension, if one exists.I.e the proposed logic would be this:
showDir: true
: Show file list.The text was updated successfully, but these errors were encountered: