plugin-legacy: polyfills chunk should respect output.entryFileNames option
See original GitHub issueClear and concise description of the problem
As a developer I want to disable hashing of filenames, so I can always reference the same polyfill file.
Suggested solution
I would be nice if the plugin-legacy would follow the build.rollupOptions.output.entryFileNames
option. In my case, I would like to add <script nomodule src="dist/assets/polyfills-legacy.js"></script>
to my HTML.
I guess it would involve adding entryFileNames: buildOptions.rollupOptions.output.entryFileNames,
to the output config of buildPolyfillChunk()
.
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that request the same feature to avoid creating a duplicate.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:5
Top Results From Across the Web
vitejs/plugin-legacy
Enabling this option will generate a separate polyfills chunk for the modern build (targeting browsers with native ESM support).
Read more >Building for production
This page focuses on recommendations for building an application that uses Lit components for production. For recommendations on build steps to perform on ......
Read more >packages/vite/CHANGELOG.md · Gitee 极速下载/ViteJS
modulePreload.polyfill . ... fix(plugin-legacy): respect entryFileNames for polyfill chunks (#8247) (baa9632), closes #8247; fix(plugin-react): broken ...
Read more >vite build
To support legacy browsers, Vite offers @vite_js/plugin-legacy. ... These output chunks need to be hashed to enable strong caching.
Read more >Building for Production | Vite (main branch)
Legacy browsers can be supported via @vitejs/plugin-legacy, which will automatically generate legacy chunks and corresponding ES language feature polyfills.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
same issue for me
temporary plan
node_modules/@vitejs/plugin-legacy/index.js
find
async function buildPolyfillChunk
waiting for repair!