mirror of
https://github.com/alex8088/electron-vite.git
synced 2026-11-02 06:42:22 +08:00
perf(swcPlugin): skip redundant minification when using Oxc (#922)
This commit is contained in:
parent
b0b33bdd5e
commit
bffc6c95df
@ -105,7 +105,7 @@ export function swcPlugin(options: SwcOptions = {}): Plugin {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async renderChunk(code, chunk): Promise<null | { code: string; map: SourceMap }> {
|
async renderChunk(code, chunk): Promise<null | { code: string; map: SourceMap }> {
|
||||||
if (!minify || minify === 'terser') {
|
if (!minify || minify === 'terser' || minify === 'oxc') {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
const result = await transformWithSWC(code, chunk.fileName, {
|
const result = await transformWithSWC(code, chunk.fileName, {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user