"@typescript-eslint/parser": "^5.56.0",
"@vitest/coverage-istanbul": "^0.29.7",
"@vue/consolidate": "0.17.3",
- "brotli": "^1.3.2",
"chalk": "^4.1.0",
"conventional-changelog-cli": "^2.0.31",
"enquirer": "^2.3.2",
-const { compress } = require('brotli')
+const { brotliCompressSync } = require('zlib')
const file = require('fs').readFileSync('dist/index.js')
-const compressed = compress(file)
+const compressed = brotliCompressSync(file)
const compressedSize = (compressed.length / 1024).toFixed(2) + 'kb'
console.log(`brotli: ${compressedSize}`)
'@typescript-eslint/parser': ^5.56.0
'@vitest/coverage-istanbul': ^0.29.7
'@vue/consolidate': 0.17.3
- brotli: ^1.3.2
chalk: ^4.1.0
conventional-changelog-cli: ^2.0.31
enquirer: ^2.3.2
'@typescript-eslint/parser': 5.56.0_qesohl5arz7pvqyycxtsqomlr4
'@vitest/coverage-istanbul': 0.29.7_vitest@0.29.7
'@vue/consolidate': 0.17.3
- brotli: 1.3.3
chalk: 4.1.2
conventional-changelog-cli: 2.2.2
enquirer: 2.3.6
fill-range: 7.0.1
dev: true
- /brotli/1.3.3:
- resolution: {integrity: sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg==}
- dependencies:
- base64-js: 1.5.1
- dev: true
-
/browserslist/4.21.5:
resolution: {integrity: sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==}
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
import { existsSync, readFileSync, rmSync } from 'node:fs'
import path from 'node:path'
import minimist from 'minimist'
-import { gzipSync } from 'node:zlib'
-import { compress } from 'brotli'
+import { gzipSync, brotliCompressSync } from 'node:zlib'
import chalk from 'chalk'
import execa from 'execa'
import { cpus } from 'node:os'
const minSize = (file.length / 1024).toFixed(2) + 'kb'
const gzipped = gzipSync(file)
const gzippedSize = (gzipped.length / 1024).toFixed(2) + 'kb'
- const compressed = compress(file)
+ const compressed = brotliCompressSync(file)
// @ts-ignore
const compressedSize = (compressed.length / 1024).toFixed(2) + 'kb'
console.log(