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

[@vitejs/plugin-legacy] Rollup option output.hashCharacters is ignored when bundling legacy polyfills chunk #19124

Open
7 tasks done
JulianSchoenbaechler opened this issue Jan 2, 2025 · 0 comments

Comments

@JulianSchoenbaechler
Copy link

JulianSchoenbaechler commented Jan 2, 2025

Describe the bug

When the Vite legacy plugin bundles polyfill chunks, the rollup option output.hashCharacters is ignored.

Relevant part in source code:

entryFileNames: rollupOutputOptions.entryFileNames,

Option output.hashCharacters should be passed as well.

Reproduction

https://stackblitz.com/edit/vitejs-vite-hvjsb2nr?file=vite.config.js

Steps to reproduce

Run npm install followed by npm run build. Observe that the produced polyfills chunk has a filename containing a base64 hash; instead of the specified base36 hash.

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:
    @vitejs/plugin-legacy: ^6.0.0 => 6.0.0 
    vite: ^6.0.5 => 6.0.6

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

No branches or pull requests

1 participant