diff --git a/docs/nginx.conf b/docs/nginx.conf index 4d37df6..a6af093 100644 --- a/docs/nginx.conf +++ b/docs/nginx.conf @@ -16,6 +16,15 @@ server { add_header Content-Type text/plain; } + # Source maps: Diplodoc CLI 4.60 не генерит .map файлы, но оставляет + # `//# sourceMappingURL=` комментарии в JS/CSS. DevTools пытается тянуть, + # получает 404 — шум в console. Возвращаем 204 No Content тихо. + location ~* "^/docs/.*\.map$" { + access_log off; + log_not_found off; + return 204; + } + # Static assets (Diplodoc CLI 4.60 bug: HTML refs hashed names типа # `_bundle/app-34c68624e23be7ce.css`, но actual файл — `app.css` (без # hash). Strip hash в nginx через rewrite: `name-.ext` → `name.ext`.