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

Closed
7 tasks done
hi-ogawa opened this issue Dec 20, 2024 · 0 comments · Fixed by #19025
Closed
7 tasks done
Labels
feat: build p2-edge-case Bug, but has workaround or limited in scope (priority)

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

@sapphi-red sapphi-red added p2-edge-case Bug, but has workaround or limited in scope (priority) feat: build labels Dec 26, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat: build p2-edge-case Bug, but has workaround or limited in scope (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants