fix(cli): refactor

This commit is contained in:
Leifer Mendez
2023-01-16 09:21:26 +01:00
parent 716349a839
commit 6683715ad6
10 changed files with 180 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
const staticPaths = new Set([
'/',
'/favicon.svg',
'/manifest.json',
'/q-manifest.json',
'/robots.txt',
'/service-worker.js',
'/sitemap.xml',
'/water-mark.png',
])
function isStaticPath(p) {
if (p.startsWith('/build/')) {
return true
}
if (p.startsWith('/assets/')) {
return true
}
if (staticPaths.has(p)) {
return true
}
return false
}
export { isStaticPath }