Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SvelteKit2 + Vite 5 no longer gzip encodes when using vite preview #11368

Closed
HummingMind opened this issue Dec 17, 2023 · 0 comments · Fixed by #11377
Closed

SvelteKit2 + Vite 5 no longer gzip encodes when using vite preview #11368

HummingMind opened this issue Dec 17, 2023 · 0 comments · Fixed by #11377

Comments

@HummingMind
Copy link

HummingMind commented Dec 17, 2023

Describe the bug

SvelteKit2 + Vite 5 no longer gzip encodes when using vite preview. Used to work with SK1 and Vite4/Vite5. No longer works after upgrading to SK2.

image

The bytes transferred is over double what it should be, since there is no gzip compression for the JavaScript assets.

It's not an issue for production, but it is a DX issue for local development, as I always preview to get an idea on the bundle size of what would go "over-the-wire" in production.

  kit: {
    adapter: adapter({ precompress: true }),
  },

The precopress setting is in the config.

Thank you!

Reproduction

Set up a new SK2 project or migrate an existing project. Use the static adapter.
Build. Preview.

Logs

No response

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (32) x64 13th Gen Intel(R) Core(TM) i9-13980HX
    Memory: 22.10 GB / 31.62 GB
  Binaries:
    Node: 21.4.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.2.5 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.7.6 - ~\AppData\Local\pnpm\pnpm.CMD
  Browsers:
    Edge: Chromium (120.0.2210.77)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    @sveltejs/adapter-static: 3.0.0 => 3.0.0 
    @sveltejs/kit: 2.0.0 => 2.0.0 
    @sveltejs/vite-plugin-svelte: 3.0.1 => 3.0.1 
    svelte: 5.0.0-next.25 => 5.0.0-next.25 
    vite: 5.0.10 => 5.0.10

Severity

annoyance

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant