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.
26 lines
569 B
26 lines
569 B
import { BuildConfig, defineBuildConfig } from "unbuild";
|
|
import { merge } from "lodash-es";
|
|
import scss from 'rollup-plugin-scss'
|
|
|
|
// OR tsup
|
|
|
|
const BaseConfig = {
|
|
entries: ["src/index.ts"],
|
|
declaration: true,
|
|
replace: {},
|
|
hooks: {
|
|
"rollup:options"(ctx, options) {
|
|
options.plugins.push(scss({ fileName: 'style.css' }))
|
|
}
|
|
},
|
|
rollup: {
|
|
emitCJS: true,
|
|
output: {
|
|
exports: "named",
|
|
},
|
|
},
|
|
} as BuildConfig;
|
|
|
|
export function mergeConfig(targetConfig: BuildConfig) {
|
|
return defineBuildConfig(merge(BaseConfig, targetConfig));
|
|
}
|
|
|