Skip to content

fallback export in +server.js not recognized #2156

@karimfromjordan

Description

@karimfromjordan

Describe the bug

SvelteKit 1.25.0 added support for a fallback export in +server.js files sveltejs/kit#9755. Writing such a fallback export currently produces the following warning:

Invalid export 'fallback' (valid exports are prerender, trailingSlash, config, entries, GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, or anything with a '_' prefix)

Reproduction

// +server.js
/** @type {import('./$types').RequestHandler} */
export async function fallback(event) {

}

Expected behaviour

No warning should be shown.

System Info

  • OS: Linux (Fedora 38)
  • IDE: VSCode

Which package is the issue about?

No response

Additional Information, eg. Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.feature requestNew feature or requestgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions