MCPcopy
hub / github.com/vuejs/core / createMinifiedConfig

Function createMinifiedConfig

rollup.config.js:362–392  ·  view source on GitHub ↗
(/** @type {PackageFormat} */ format)

Source from the content-addressed store, hash-verified

360}
361
362function createMinifiedConfig(/** @type {PackageFormat} */ format) {
363 return createConfig(
364 format,
365 {
366 file: outputConfigs[format].file.replace(/\.js$/, '.prod.js'),
367 format: outputConfigs[format].format,
368 },
369 [
370 {
371 name: 'swc-minify',
372
373 async renderChunk(contents, _, { format }) {
374 const { code } = await minifySwc(contents, {
375 module: format === 'es',
376 format: {
377 comments: false,
378 },
379 compress: {
380 ecma: 2016,
381 pure_getters: true,
382 },
383 safari10: true,
384 mangle: true,
385 })
386
387 return { code: banner + code, map: null }
388 },
389 },
390 ],
391 )
392}

Callers 1

rollup.config.jsFile · 0.85

Calls 1

createConfigFunction · 0.85

Tested by

no test coverage detected