@farmfe/cli
Version:
CLI of Farm
22 lines • 704 B
JavaScript
export function getOptionFromBuildOption(options) {
const { input, outDir, target, format, watch, minify, sourcemap, treeShaking, mode } = options;
const output = {
...(outDir && { path: outDir }),
...(target && { targetEnv: target }),
...(format && { format })
};
const compilation = {
input: { ...(input && { index: input }) },
output,
...(watch && { watch }),
...(minify && { minify }),
...(sourcemap && { sourcemap }),
...(treeShaking && { treeShaking })
};
const defaultOptions = {
compilation,
...(mode && { mode })
};
return defaultOptions;
}
//# sourceMappingURL=config.js.map