diff --git a/mocks/app/routes/app/nested/index.tsx b/mocks/app/routes/app/nested/index.tsx
new file mode 100644
index 0000000..9902cd3
--- /dev/null
+++ b/mocks/app/routes/app/nested/index.tsx
@@ -0,0 +1,3 @@
+export default function () {
+ return
Nested
+}
diff --git a/src/vite/index.ts b/src/vite/index.ts
index 7a6441c..72c859e 100644
--- a/src/vite/index.ts
+++ b/src/vite/index.ts
@@ -33,7 +33,7 @@ function honox(options?: Options): PluginOption[] {
entry,
exclude: [
...devServerDefaultOptions.exclude,
- /^\/app\/.+/,
+ /^\/app\/.+\.tsx?/,
/^\/favicon.ico/,
/^\/static\/.+/,
],
diff --git a/test-e2e/e2e.test.ts b/test-e2e/e2e.test.ts
index 2691c49..04ff231 100644
--- a/test-e2e/e2e.test.ts
+++ b/test-e2e/e2e.test.ts
@@ -131,3 +131,9 @@ test('server-side suspense contains island components', async ({ page }) => {
await container.getByText('Count: 7').click()
await container.getByText('Suspense Islands').click()
})
+
+test('/app/nested', async ({ page }) => {
+ await page.goto('/app/nested')
+ const contentH1 = await page.textContent('h1')
+ expect(contentH1).toBe('Nested')
+})
diff --git a/test-integration/apps.test.ts b/test-integration/apps.test.ts
index 049191f..5ad05ae 100644
--- a/test-integration/apps.test.ts
+++ b/test-integration/apps.test.ts
@@ -96,8 +96,12 @@ describe('Basic', () => {
path: '/throw_error',
method: 'GET',
},
+ {
+ path: '/app/nested',
+ method: 'GET',
+ },
]
- expect(app.routes).toHaveLength(46)
+ expect(app.routes).toHaveLength(48)
expect(app.routes).toEqual(
expect.arrayContaining(
routes.map(({ path, method }) => {