diff --git a/src/server/utils/file.ts b/src/server/utils/file.ts index c2a21de..5f264e6 100644 --- a/src/server/utils/file.ts +++ b/src/server/utils/file.ts @@ -1,7 +1,7 @@ export const filePathToPath = (filePath: string) => { filePath = filePath .replace(/\.tsx?$/g, '') - .replace(/\.mdx$/g, '') + .replace(/\.mdx?$/g, '') .replace(/^\/?index$/, '/') // `/index` .replace(/\/index$/, '') // `/about/index` .replace(/\[\.{3}.+\]/, '*') diff --git a/src/server/with-defaults.ts b/src/server/with-defaults.ts index 9a94271..5481cf8 100644 --- a/src/server/with-defaults.ts +++ b/src/server/with-defaults.ts @@ -32,8 +32,8 @@ export const createApp = (options?: ServerOptions) => { options?.ROUTES ?? import.meta.glob( [ - '/app/routes/**/!(_*|*.test|*.spec).(ts|tsx|mdx)', - '/app/routes/.well-known/!(_*|*.test|*.spec).(ts|tsx|mdx)', + '/app/routes/**/!(_*|*.test|*.spec).(ts|tsx|md|mdx)', + '/app/routes/.well-known/!(_*|*.test|*.spec).(ts|tsx|md|mdx)', ], { eager: true,