You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

20 lines
412 B

import { BuildConfig, defineBuildConfig } from "unbuild";
import { merge } from "lodash-es";
// OR tsup
const BaseConfig = {
entries: ["src/index.ts"],
declaration: true,
replace: {},
rollup: {
emitCJS: true,
output: {
exports: "named",
},
},
} as BuildConfig;
export function mergeConfig(targetConfig: BuildConfig) {
return defineBuildConfig(merge(BaseConfig, targetConfig));
}