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

Change config prerender.force to prerender.onError #2007

Merged

Commits on Jul 27, 2021

  1. Change config prerender.force to prerender.onError

    fixes sveltejs#1940
    
    - Changing from `force` to `onError` gives a somewhat more descriptive
      name to the option.
    - Using the strings "fail" and "continue" further clarifies what the
      option does.
    - Providing your own function to deal with an error allows for
      fine-tuning which errors fail the build and which do not.
    
    The original ticket suggested that the custom function return a boolean,
    but after seeing the implementation of the error handler in svelteKit, I
    thought it more fitting to just allow it the exact same API: throw if
    you want the build to fail.
    happycollision committed Jul 27, 2021
    Configuration menu
    Copy the full SHA
    74c2684 View commit details
    Browse the repository at this point in the history
  2. Add failure message for use of prerender.force

    This commit can be reverted for the 1.0 release. It is purely here for
    ease of transition from `force` to `onError`.
    happycollision committed Jul 27, 2021
    Configuration menu
    Copy the full SHA
    c6f5a10 View commit details
    Browse the repository at this point in the history