Skip to content

V2: No supported way to exclude prerendered routes from the server bundle #8741

Description

@briancarbone

I prerender a large content section (a few hundred MDX pages) and deploy to a single-artifact edge runtime. The prerendered HTML is served from KV and those routes never run on the server, but their compiled components are still bundled into the server build, which blows the binary size limit.

ssg.include only controls what gets prerendered, but it does not remove those routes from the generated route table (@qwik-router-config), which statically imports every route in routesDir.

Is there a supported way to keep a static-only route out of the server bundle? createRoutes and generateQwikRouterConfig in the router vite plugin emit import() for every route with no exclusion. The SSG step prerenders HTML and injects the static paths array but never prunes the table.

Using
@qwik.dev/router f535f59
@qwik.dev/core f535f59

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions