Skip to content

[✨] Add trailingIndex to QwikCity that enables SPA builds to function in Capacitor, Cordova, and other hybrid native app environments #45

@n8sabes

Description

@n8sabes

Is your feature request related to a problem?

To support SPA builds for Capacitor, Cordova and other static hybrid host environments, it is necessary to include /index.html to the path. Currently this is not possible without custom link logic sprinkled throughout the entire project.

Describe the solution you'd like

Enhance QwikCity to include trailingIndex.

export interface QwikCityPlan {
  readonly routes: RouteData[];
  readonly serverPlugins?: RouteModule[];
  readonly basePathname?: string;
  readonly menus?: MenuData[];
  readonly trailingSlash?: boolean;
  readonly trailingIndex?: boolean;    // <-------
  readonly cacheModules?: boolean;
}

Describe alternatives you've considered

Custom <SmartLink /> components. This works but adds a layer of complexity to every project.

Additional context

Related to QwikDev/qwik#5731

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions