Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/integration-tests/test/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ describe('server', function () {
assert.equal(await get('/', port), rootIndex);
assert.equal(await get('/something', port), rootIndex);
assert.equal(await get('/other', port), other);
assert.equal(await get('/foo', port), rootIndex);
assert.equal(await get('/foo', port), fooIndex);
assert.equal(await get('/foo/', port), fooIndex);
assert.equal(await get('/foo/bar', port), fooIndex);
assert.equal(await get('/foo/other', port), fooOther);
Expand Down
7 changes: 5 additions & 2 deletions packages/reporters/dev-server/src/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,11 @@ export default class Server {
let isIndex = withoutExtension === 'index';

let matchesIsIndex = null;
if (isIndex && req.url.startsWith(bundleDirSubdir)) {
// bundle is /bar/index.html and something inside of /bar/** was requested
if (
isIndex &&
(req.url.startsWith(bundleDirSubdir) || req.url === bundleDir)
) {
// bundle is /bar/index.html and (/bar or something inside of /bar/** was requested was requested)
matchesIsIndex = true;
} else if (req.url == path.posix.join(bundleDir, withoutExtension)) {
// bundle is /bar/foo.html and /bar/foo was requested
Expand Down