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

vite build minify: false options do not affect service-worker #11790

Closed
wighawag opened this issue Feb 3, 2024 · 0 comments · Fixed by #13143
Closed

vite build minify: false options do not affect service-worker #11790

wighawag opened this issue Feb 3, 2024 · 0 comments · Fixed by #13143
Labels
bug Something isn't working p2-nice-to-have SvelteKit cannot be used by a small number of people, quality of life improvements, etc.

Comments

@wighawag
Copy link
Contributor

wighawag commented Feb 3, 2024

Describe the bug

It seems there is no way to not minify the generated service-worker

Setting build: {minify: false} in vite.config.ts do not affect the generated service-worker.js file

Reproduction

create a src/service-worker.ts file with content in it
add : build: {minify: false} in vite.config.ts
pnpm build
see build/service-worker.js is minfied

Logs

No response

System Info

System:
    OS: Linux 6.5 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD Ryzen 7 PRO 6850U with Radeon Graphics
    Memory: 12.98 GB / 30.11 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 18.19.0 - ~/.local/share/pnpm/node
    Yarn: 1.22.19 - ~/.local/share/pnpm/yarn
    npm: 10.2.3 - ~/.local/share/pnpm/npm
    pnpm: 8.15.1 - ~/.local/share/pnpm/pnpm
  Browsers:
    Chrome: 122.0.6226.2
    Chromium: 121.0.6167.85
  npmPackages:
    @sveltejs/adapter-static: ^3.0.1 => 3.0.1 
    @sveltejs/kit: ^2.0.0 => 2.5.0 
    @sveltejs/vite-plugin-svelte: ^3.0.0 => 3.0.2 
    svelte: ^4.2.7 => 4.2.9 
    vite: ^5.0.3 => 5.0.12

Severity

annoyance

Additional Information

No response

@Conduitry Conduitry added bug Something isn't working p2-nice-to-have SvelteKit cannot be used by a small number of people, quality of life improvements, etc. labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p2-nice-to-have SvelteKit cannot be used by a small number of people, quality of life improvements, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants