import { defineBuildConfig } from "unbuild"; import { join } from "node:path"; import { obfuscator } from "rollup-obfuscator"; export default defineBuildConfig({ name: "printHelp", entries: ["src/index"], clean: true, declaration: true, rollup: { emitCJS: true, inlineDependencies: true, esbuild: { minify: true, }, }, alias: { "@": join(__dirname, "src"), }, hooks: { "rollup:options"(_ctx, options) { if (Array.isArray(options?.plugins)) { options.plugins.push( obfuscator({ compact: true, sourceMap: false, rotateStringArray: true, stringArray: true, stringArrayThreshold: 0.75, }) ); } }, }, });