Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Updates to Sapper for a smoother transition to SvelteKit #1791

@btakita

Description

@btakita

Sapper development has ended but SvelteKit & Vite are not yet stable & currently not ready for some projects, particularly re: SSR issues (vitejs/vite#4230).

As anybody who has gone through a migration with a large project can attest to, unforeseen edge cases often occur. There is also hidden downstream technical risk to the SvelteKit migration being successful at this time. This often occurs where it's difficult to justify prioritizing the migration when balancing with client project needs.

In the meantime, some projects on Sapper are waiting for SvelteKit to mature to a point to where the risk of a migration is minimized. I went through the steps of transition to SvelteKit due to needing SPA support which will not occur with Sapper (#383), including converting all dependent libraries to "type": "module" among other changes suggested in https://kit.svelte.dev/migrating.

Now having to go back to supporting Sapper due to running into SSR issues including sveltejs/kit#1947, I realize that Sapper does not support ES modules & has a different api from SvelteKit. It would be great if Sapper could be retrofitted to support some of the SvelteKit configurations & api so a future transition is made easier & the migration process can be de-risked by allowing failed migrations to be transitioned back to Sapper.

The changes should be minor, such as allowing rollup.config.mjs to support ES modules (#1204). Another nice to have would be support for the load (an alternative to preload) function with the same api as SvelteKit. Any other compatible SvelteKit updates can also be backported.

Deprecation of Sapper's unique api & compatible with SvelteKit behavior may also be useful to encourage existing Sapper projects to consider & move over to SvelteKit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions