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

cannot specify minify independently for environments when builder.sharedPlugins: true #19023

Open
7 tasks done
hi-ogawa opened this issue Dec 20, 2024 · 0 comments · May be fixed by #19025
Open
7 tasks done

cannot specify minify independently for environments when builder.sharedPlugins: true #19023

hi-ogawa opened this issue Dec 20, 2024 · 0 comments · May be fixed by #19025

Comments

@hi-ogawa
Copy link
Collaborator

Describe the bug

When enabling builder.sharedPlugins, both client and server build gets minified. Specifying in environments.ssr.build.minify doesn't work as well.

Reproduction

https://stackblitz.com/github/hi-ogawa/reproductions/tree/main/vite-builder-sharedPlugins-minify?file=dist%2Fserver%2Fentry.server.js

Steps to reproduce

Run pnpm build, which generates following assets

  • dist/client/assets/entry.client-DenyN4II.js
function i(){console.log("minified?")}i();
  • dist/server/entry.server.js
function e(){console.log("minified?")}e();

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    vite: ^6.0.4 => 6.0.4

Used Package Manager

npm

Logs

No response

Validations

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

Successfully merging a pull request may close this issue.

1 participant