Skip to content

Commit

Permalink
fix(plugin-legacy): legacy sourcemap not generate (fix vitejs#11693)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan committed Jan 29, 2023
1 parent 128f09e commit 11e4eb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugin-legacy/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] {
if (isLegacyBundle(bundle, opts)) {
// avoid emitting duplicate assets
for (const name in bundle) {
if (bundle[name].type === 'asset') {
if (bundle[name].type === 'asset' && !/.+\.map$/.test(name)) {
delete bundle[name]
}
}
Expand Down

0 comments on commit 11e4eb0

Please sign in to comment.