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

Revert change to render fallback when prerendering is disabled #4604

Merged
merged 6 commits into from Apr 13, 2022

Conversation

dimfeld
Copy link
Contributor

@dimfeld dimfeld commented Apr 13, 2022

Fixes #4492.

Loading hooks.js and/or executing the handle hook during the build process causes problems for some people, and so rendering the fallback page event when prerendering is disabled presents those people with build failures that can not be worked around. This PR reverts #4443, which enabled that behavior after the prerender process was moved into the build step.

For those like me who need a fallback page but are saddled with code that causes the build process to fail because Node.js throws a tantrum when you even try to import a page component, a configuration workaround is presented in the README for adapter-static. (An example is dependencies that are ESM compatible, but not in the exact one way that Node requires them to be.)

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpx changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

@changeset-bot
Copy link

changeset-bot bot commented Apr 13, 2022

🦋 Changeset detected

Latest commit: d3f059f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Rich-Harris Rich-Harris merged commit 21d20c3 into sveltejs:master Apr 13, 2022
@Rich-Harris
Copy link
Member

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SvelteKit v1.0.0-next.304 is suddenly executing code during build, prerender problem?
3 participants