pub fn is_metadata_route_file(
app_dir_relative_path: &str,
page_extensions: &[RcStr],
with_extension: bool,
) -> bool
Expand description
When you only pass the file extension as []
, it will only match the static
convention files e.g. /robots.txt
, /sitemap.xml
, /favicon.ico
,
/manifest.json
.
When you pass the file extension as ['js', 'jsx', 'ts', 'tsx']
, it will also match the dynamic convention files e.g. /robots.js,
/sitemap.tsx, /favicon.jsx, /manifest.ts.
When withExtension
is false, it will match the static convention files
without the extension, by default it’s true e.g. /robots, /sitemap,
/favicon, /manifest, use to match dynamic API routes like app/robots.ts.