Skip to content

Commit

Permalink
fix: vite2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
nonzzz committed Aug 15, 2024
1 parent a407b6a commit a6ae417
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ function compression<T extends UserCompressionOptions, A extends Algorithm>(
// more and more plugin use are starting specify plugin order. So we should do a check for vite's version.
const [major, minor] = rollupVersion.split('.')
// rollup support object hook at 2.78.0
if (+major < 2 && +minor < 78) {
if (+major <= 2 && +minor < 78) {
hijackGenerateBundle(viteAnalyzerPlugin, generateBundle)
return
}
Expand Down

0 comments on commit a6ae417

Please sign in to comment.