diff --git a/packages/runtime-vapor/src/dom/prop.ts b/packages/runtime-vapor/src/dom/prop.ts index be4cc0851..4646572ea 100644 --- a/packages/runtime-vapor/src/dom/prop.ts +++ b/packages/runtime-vapor/src/dom/prop.ts @@ -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, diff --git a/rollup.config.js b/rollup.config.js index 05e2e0e8e..1fa345f87 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -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 } + }, + }, ], ) }