From a6ae417db4d7852e910baa96b0272add256552d7 Mon Sep 17 00:00:00 2001 From: kanno <812137533@qq.com> Date: Thu, 15 Aug 2024 18:41:08 +0800 Subject: [PATCH] fix: vite2 support --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 65f47a9..17a5e73 100644 --- a/src/index.ts +++ b/src/index.ts @@ -218,7 +218,7 @@ function compression( // 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 }