Skip to content

Commit

Permalink
chore: make eslint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed May 9, 2024
1 parent de7e45d commit 2e38510
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,12 @@ function viteMinify(options: JsMinifyOptions = {}): any {
config(viteOption) {
if (viteOption.build?.minify) {
// Disable Vite built-in minification
viteOption.build.minify = false
viteOption.build.minify = false;
// When build.minify is enabled, Vite will also enable build.cssMinify
// But here we only want to disable Vite built-in JS minification
// So we need to manually enable build.cssMinify after disabling build.minify
if (!viteOption.build.cssMinify) {
viteOption.build.cssMinify = true
viteOption.build.cssMinify = true;
}
}
return viteOption;
Expand All @@ -225,7 +225,7 @@ function viteMinify(options: JsMinifyOptions = {}): any {
order: 'post',
handler(code) {
return swcMinify(code, options);
},
}
}
} satisfies VitePlugin;
}
Expand Down

0 comments on commit 2e38510

Please sign in to comment.