diff --git a/packages/docusaurus/src/commands/serve.ts b/packages/docusaurus/src/commands/serve.ts index e2446abea84b..a4b0acf1fcb1 100644 --- a/packages/docusaurus/src/commands/serve.ts +++ b/packages/docusaurus/src/commands/serve.ts @@ -80,7 +80,7 @@ export async function serve( if (baseUrl !== '/') { // Not super robust, but should be good enough for our use case // See https://github.com/facebook/docusaurus/pull/10090 - const looksLikeAsset = !!req.url.match(/.[a-zA-Z\d]{1,4}$/); + const looksLikeAsset = !!req.url.match(/\.[a-zA-Z\d]{1,4}$/); if (!looksLikeAsset) { const normalizedUrl = applyTrailingSlash(req.url, { trailingSlash,