Skip to content

Differential legacy builds #12

Closed as not planned
Closed as not planned

Description

@Rich-Harris

Not yet sure what this looks like

Activity

  1. transferred this issue fromon Oct 15, 2020
  2. FredKSchott commented on Oct 16, 2020

    @FredKSchott
  3. added this to the 1.0 milestone on Oct 29, 2020
  4. changed the title [-]Differential builds[/-] [+]Differential legacy builds[/+] on Mar 14, 2021
  5. backflip commented on Mar 23, 2021

    @backflip
  6. seanlail commented on Apr 7, 2021

    @seanlail
    Contributor

    If legacy support is added it will likely add security vulnerabilities.

    Which is fine... if legacy is opt-in only the user should be warned that it could be dangerous.
    The thing to watch out for is that these vulnerabilities are not exposed to the non-legacy / default setup.

    This has come up in a few tickets in Sapper and most recently here:
    sveltejs/sapper#1760

    Relates to #93

  7. modified the milestones: 1.0, post-1.0 on May 1, 2021
  8. johngrasty commented on May 14, 2021

    @johngrasty

    I have not doubt this is a pain, but I am very glad that it is being considered though. These legacy platforms are no fun, but they are still often a reality. Thank y'all for all of the hard work on this project. It really is great!

  9. silllli commented on May 16, 2021

    @silllli

    +1 @johngrasty

    (I have used a solution based on Antony Jones’ repository (antony/sapper-ie) for IE11 support with Sapper and was quite happy I got it working rather automatically.

    If you work on projects for or visited by public institutions in Germany, there are chances that these visitors are using an old, restricted Windows machine. 😢)

  10. 23 remaining items

  11. Tal500 commented on Jan 10, 2023

    @Tal500
    Contributor

    If you work on projects for or visited by public institutions in Germany, there are chances that these visitors are using an old, restricted Windows machine. 😢)

    @silllli this is exactly my problem. I fear the browser and Windows version are not the real problem. They probably use a white list. Complex JavaScript apps like Google Maps work, but the Svelte test-page (even the legacy test-page) do not work.
    Have you found a workaround?

    I still use Sapper 🥲

    I was also like this, until I have become more aggressive, so I created my own PR #6265 and maintain my own fork of SvelteKit. Please tell me if this PR and the demo have a nice DX for you.
    It still requires the browser version to be at least IE11 or something similar though, can't pass through this limit.

  12. ZaDarkSide commented on Jan 13, 2023

    @ZaDarkSide

    @Rich-Harris please take a look at the PR #6265 from @Tal500 we need this feature in SvelteKit 👍

  13. jokin commented on Feb 23, 2023

    @jokin

    It still requires the browser version to be at least IE11 or something similar though, can't pass through this limit.

    for me is more than enough, as what i need to support are chrome 49 and opera 32 versions, because of deployed fleets of tvs that included that versions, well, deployed and even new tvs came with that browser versions, so your fork has been a nice thing to start migrating from sapper version.

    There's something that we can do to help integrate this fork more easily in the main branch?

  14. Tal500 commented on Feb 23, 2023

    @Tal500
    Contributor

    It still requires the browser version to be at least IE11 or something similar though, can't pass through this limit.

    for me is more than enough, as what i need to support are chrome 49 and opera 32 versions, because of deployed fleets of tvs that included that versions, well, deployed and even new tvs came with that browser versions, so your fork has been a nice thing to start migrating from sapper version.

    There's something that we can do to help integrate this fork more easily in the main branch?

    This PR is outdated. Please see my own PR based on this one, in #6265.

  15. gamesguru commented on Apr 15, 2023

    @gamesguru

    @Tal500

    @Rich-Harris expressed concerns with merging legacy support to the main kit. He suggested this be made into a plugin, rather than core functionality. Would it be possible to maintain this as a fork until there is community consensus?

    His other suggestion of progressive enhancement seems woefully at odds with the frameworks of vite and svelte, which take the unique approach of prioritizing modern support and leaving legacy browsers as an afterthought. But I read Vue 3 will not support ES5 out of the box, so this may increasingly become the case.

    It has been pointed out that svelte is an unusually speedy framework. I'm wondering what can be done to make it an unusually backward compatible framework as well? Having things break on older devices with no warning or explanation is not a good look.

    Edit:

    Looks like nginx has some support for browser specific serving. But we don't even have working ES5 builds for svelte projects?

    https://nginx.org/en/docs/http/ngx_http_browser_module.html

  16. Tal500 commented on Apr 15, 2023

    @Tal500
    Contributor

    @Tal500

    @Rich-Harris expressed concerns with merging legacy support to the main kit. He suggested this be made into a plugin, rather than core functionality. Would it be possible to maintain this as a fork until there is community consensus?

    Sadly, that's what I'm doing currently, while still hoping for a solution from the core team.
    Another disappointing fact is that I don't see how this feature can be extracted to a plugin in a normal way, since the "logic extraction" is already done by using the external Vite plugin-legacy. The main concern for SvelteKit is to write a legacy-compatible code, while the legacy bundling is done by the external Vite plugin already.

    His other suggestion of progressive enhancement seems woefully at odds with the frameworks of vite and svelte, which take the unique approach of prioritizing modern support and leaving legacy browsers as an afterthought. But I read Vue 3 will not support ES5 out of the box, so this may increasingly become the case.

    That's not true about Vue 3, see Vue 3 Browser Compatibility.
    Basically, the Vite plugin-legacy is a piece of code written by the same guys maintaining Vue, so the same logic, however in a fancier more universal form, is being offered by Vite plugin-legacy.
    SvelteKit has an advantage over Vue that it's specific only to the Vite bundler, so we can leverage the hard work that done by the Vite plugin-legacy, we just need to "read" its results correctly, and this is basically what my PR is doing(plus many tests and etc.).

    It has been pointed out that svelte is an unusually speedy framework. I'm wondering what can be done to make it an unusually backward compatible framework as well? Having things break on older devices with no warning or explanation is not a good look.

    Totally agree!

    Edit:

    Looks like nginx has some support for browser specific serving. But we don't even have working ES5 builds for svelte projects?

    https://nginx.org/en/docs/http/ngx_http_browser_module.html

    The philosophy of "modern" legacy support is to not distinguish the legacy browsers in the HTTP request level, but on the client level instead, making it so simpler basically for everything (testing/debugging/caching/static-serving...). Thankfully, the solution in the client level is simple enough so you wouldn't naturally like to go to these places.

  17. gamesguru commented on Apr 19, 2023

    @gamesguru

    @Tal500 Do you have it in the npm registry? As long as it's merged within the last few versions, I don't need the latest. Do we still need the legacy adapter if we're going to use this?

    Other than that, I would try out Sapper I guess.

  18. madkarlsson commented on Jul 21, 2023

    @madkarlsson

    @gamesguru

    Other than that, I would try out Sapper I guess.

    Sapper is deprecated and should not be an alternative or a solution for anything at this point

    https://sapper.svelte.dev/docs

    Sapper has been deprecated in favor of SvelteKit. We recommend using SvelteKit.
    for all projects moving forward. Sapper will no be receiving security fixes, bug fixes, or any type of improvements.

  19. Tal500 commented on Aug 25, 2023

    @Tal500
    Contributor

    @Tal500 Do you have it in the npm registry? As long as it's merged within the last few versions, I don't need the latest. Do we still need the legacy adapter if we're going to use this?

    Other than that, I would try out Sapper I guess.

    Sorry for the long wait, but I think I cannot keep update every time a new kit conflict occurs.
    I'll be glad if anyone could help me keep update the versioning, since I don't have time for this side project for now.

  20. nmnmcc commented on Oct 1, 2023

    @nmnmcc
  21. cyanerd commented on Oct 13, 2025

    @cyanerd
  22. Nic-Polumeyv commented on Jul 17, 2026

    @Nic-Polumeyv
    Member

    Kit 3 requires Svelte 5 (svelte: ^5.56 peer), and Svelte 5's client runtime is built on Proxy ($state objects, rest/spread props), which can't be transpiled and only partially polyfilled. So a legacy differential build of a current Kit app isn't possible even via the plugin route discussed above. I think this can be closed.

  23. Rich-Harris commented on Jul 29, 2026

    @Rich-Harris
    MemberAuthor

    Agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions