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

fix(plugin-legacy): respect entryFileNames for polyfill chunks for v2.x.x Vite version. Issue #4221 #8958

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/plugin-legacy/index.js
Expand Up @@ -564,7 +564,7 @@ async function buildPolyfillChunk(
buildOptions,
externalSystemJS
) {
let { minify, assetsDir } = buildOptions
let { minify, assetsDir, entryFileNames } = buildOptions
minify = minify ? 'terser' : false
const res = await build({
// so that everything is resolved from here
Expand All @@ -583,7 +583,8 @@ async function buildPolyfillChunk(
},
output: {
format: name.includes('legacy') ? 'iife' : 'es',
manualChunks: undefined
manualChunks: undefined,
entryFileNames,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-legacy/package.json
@@ -1,6 +1,6 @@
{
"name": "@vitejs/plugin-legacy",
"version": "1.8.2",
"version": "1.8.3",
"license": "MIT",
"author": "Evan You",
"files": [
Expand Down