Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
esm: args.esm && { type: args.esm === true ? 'rollup' : args.esm },
cjs: args.cjs && { type: args.cjs === true ? 'rollup' : args.cjs },
umd: args.umd && { name: args.umd === true ? undefined : args.umd },
file: args.file,
target: args.target,
entry: args._.slice(1),
});
if (buildArgs.file && buildArgs.entry && buildArgs.entry.length > 1) {
signale.error(new Error(
`Cannot specify file when have multiple entries (${buildArgs.entry.join(', ')})`
));
process.exit(1);
}
require('father-build').default({
cwd,
watch: args.w || args.watch,
buildArgs,
}).catch(e => {
signale.error(e);
process.exit(1);
});
}