swc/packages/core/benches/minify.mjs
Donny/강동윤 f960d52364
refactor(bindings): Make @swc/core a subpackage (#8625)
**Description:**

This is for consistency and future extensions.
2024-05-18 09:23:06 +09:00

11 lines
260 B
JavaScript

import { minify } from '../../index.js';
import { promises as fs } from 'fs';
const files = process.argv.slice(2);
const inputCode = await fs.readFile(files[0], 'utf8');
await minify(inputCode, {
compress: true,
mangle: true,
sourceMap: false,
})