mirror of
https://github.com/element-plus/element-plus.git
synced 2024-12-21 02:50:11 +08:00
0636e1e240
* style: add import lint * chore: apply eslint rules * chore: add stricter lint * chore: lint all files * auto fix * manually fix * restore build-indices.ts
18 lines
499 B
TypeScript
18 lines
499 B
TypeScript
import chalk from 'chalk'
|
|
import type { FileSizeReporter } from 'rollup-plugin-filesize'
|
|
|
|
const reporter: FileSizeReporter = (opt, outputOptions, info) => {
|
|
const values = [
|
|
info.fileName ? [`${outputOptions.file?.split('packages/').pop()}`] : [],
|
|
|
|
[`${info.bundleSize}`],
|
|
...(info.minSize ? [`${info.minSize}`] : []),
|
|
]
|
|
|
|
return `${chalk.cyan(chalk.bold(values[0]))}: bundle size ${chalk.yellow(
|
|
values[1]
|
|
)} -> minified ${chalk.green(values[2])}`
|
|
}
|
|
|
|
export default reporter
|