Skip to content

Commit

Permalink
fix(plugin-legacy): chunk may not exist (#3886)
Browse files Browse the repository at this point in the history
  • Loading branch information
y1d7ng authored Jun 25, 2021
1 parent de1ddd4 commit dd5931d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/plugin-legacy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ function viteLegacyPlugin(options = {}) {
},

transformIndexHtml(html, { chunk }) {
if (!chunk) return
if (chunk.fileName.includes('-legacy')) {
// The legacy bundle is built first, and its index.html isn't actually
// emitted. Here we simply record its corresponding legacy chunk.
Expand Down

0 comments on commit dd5931d

Please sign in to comment.