mirror of https://github.com/vuejs/core.git
chore: update
This commit is contained in:
parent
a921dcfb47
commit
37a6e01982
|
@ -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,
|
||||
|
|
|
@ -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 }
|
||||
},
|
||||
},
|
||||
],
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue