Skip to content
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

[feat] more info about prerendering errors and new strict option #7264

Merged
merged 10 commits into from
Oct 18, 2022
Prev Previous commit
Next Next commit
swap ternary around, remove dead code
  • Loading branch information
Rich-Harris committed Oct 16, 2022
commit 470ae897f1465a62f692968ae3dbc1da83bf7580
11 changes: 4 additions & 7 deletions packages/adapter-static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,10 @@ export default function (options) {
const has_routes_with_params = dynamic_routes.some((route) => route.includes('['));
const config_option =
dummdidumm marked this conversation as resolved.
Show resolved Hide resolved
JSON.stringify(builder.config.kit.prerender.entries) === '["*"]' &&
!has_routes_with_params
? ''
: ` - adjust the \`prerender.entries\` config option ${
has_routes_with_params
? `(routes with parameters are not part of entry points by default)`
: ''
} — see https://kit.svelte.dev/docs/configuration#prerender for more info\n`;
has_routes_with_params
? ` - adjust the \`prerender.entries\` config option (routes with parameters are not part of entry points by default) — see https://kit.svelte.dev/docs/configuration#prerender for more info\n`
: '';

builder.log.error(
`@sveltejs/adapter-static: all routes must be fully prerenderable, but found the following routes that are dynamic:
${dynamic_routes.map((id) => ` - ${path.posix.join(prefix, id)}`).join('\n')}
Expand Down