chore: update

This commit is contained in:
daiwei 2025-09-22 15:45:10 +08:00
parent a921dcfb47
commit 37a6e01982
2 changed files with 22 additions and 20 deletions

View File

@ -409,7 +409,7 @@ function classHasMismatch(
let hasMismatch: boolean = false
if (isIncremental) {
if (expectedClassSet.size > 0) {
if (expected) {
hasMismatch = Array.from(expectedClassSet).some(
cls => !actualClassSet.has(cls),
)
@ -447,7 +447,7 @@ function styleHasMismatch(
let hasMismatch: boolean = false
if (isIncremental) {
if (expectedStyleMap.size > 0) {
if (expected) {
// check if the expected styles are present in the actual styles
hasMismatch = Array.from(expectedStyleMap.entries()).some(
([key, val]) => actualStyleMap.get(key) !== val,

View File

@ -392,24 +392,26 @@ function createMinifiedConfig(/** @type {PackageFormat} */ format) {
file: outputConfigs[format].file.replace(/\.js$/, '.prod.js'),
},
[
// {
// name: 'swc-minify',
// async renderChunk(contents, _, { format }) {
// const { code } = await minifySwc(contents, {
// module: format === 'es',
// format: {
// comments: false,
// },
// compress: {
// ecma: 2016,
// pure_getters: true,
// },
// safari10: true,
// mangle: true,
// })
// return { code: banner + code, map: null }
// },
// },
{
name: 'swc-minify',
async renderChunk(contents, _, { format }) {
const { code } = await minifySwc(contents, {
module: format === 'es',
format: {
comments: false,
},
compress: {
ecma: 2016,
pure_getters: true,
},
safari10: true,
mangle: true,
})
return { code: banner + code, map: null }
},
},
],
)
}