mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 06:05:11 +00:00
fix(generator): avoid generating route with extension
This commit is contained in:
parent
e87bad4cce
commit
80396cbf41
@ -277,7 +277,7 @@ export default class Generator {
|
||||
parse(html).querySelectorAll('a').map((el) => {
|
||||
const href = (el.getAttribute('href') || '').split('?')[0].split('#')[0].trim()
|
||||
|
||||
if (href.startsWith('/') && this.shouldGenerateRoute(href) && !this.generatedRoutes.has(href)) {
|
||||
if (href.startsWith('/') && !path.extname(href) && this.shouldGenerateRoute(href) && !this.generatedRoutes.has(href)) {
|
||||
this.generatedRoutes.add(href) // add the route to the tracked list
|
||||
this.routes.push({ route: href })
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user