-
-
Notifications
You must be signed in to change notification settings - Fork 673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(html-validator): ensure compatibility #3291
Comments
Maybe we could rename this ticket to "fix(nitro): sql file should not be prerendered" if this is indeed the case. |
I think we should specify to the html-validator to ignore this route @dargmuesli Could you try with: htmlValidator: {
ignore: [/\.(xml|rss|json)$/, /^\/__nuxt_content/]
} And see if this fixes the issue? |
I tried that, somehow it doesn't ignore as expected (updated the reproduction, error still shows). The following does not show the error though: nitro: {
prerender: {
ignore: ['/__nuxt_content/content/sql_dump'],
}
} But I guess the prerender is intended? |
Hey @dargmuesli
|
That's a nice fix, works! 🎉 |
Environment
Version
v3.4.0
Reproduction
https://stackblitz.com/edit/github-l2iaunq8?file=nuxt.config.ts
Make sure to download the project and run it with a modern Node version for SQLite support!
Then use
pnpm build
to get the logs as shown below.Description
When having
@nuxtjs/html-validator
, the validator tries to parse the SQLite file's doctype (/__nuxt_content/content/sql_dump
) as that route is part of prerendering. Should the database file be part of prerendering? It seems to be the only prerendered page, even in a large project of mine with many "actual" pages, which makes me think it shouldn't.Additional context
Logs
The text was updated successfully, but these errors were encountered: