@rspack/cli
Version:
CLI for rspack
27 lines (22 loc) • 545 B
JavaScript
import nodeModule from 'node:module';
// enable on-disk code caching of all modules loaded by Node.js
// requires Nodejs >= 22.8.0
const { enableCompileCache } = nodeModule;
if (enableCompileCache) {
try {
enableCompileCache();
} catch {
// ignore errors
}
}
import { RspackCLI } from '../dist/index.js';
async function runCLI() {
const cli = new RspackCLI();
await cli.run(process.argv);
}
runCLI().catch((err) => {
console.error('[rspack] CLI failed:');
console.error(err);
process.exit(1);
});