Skip to content

Commit

Permalink
fix(mkdist): allow passing all possible options
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jul 18, 2023
1 parent 0627cfd commit f40a889
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 1 addition & 5 deletions src/builder/mkdist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@ export async function mkdistBuild(ctx: BuildContext) {
rootDir: ctx.options.rootDir,
srcDir: entry.input,
distDir,
format: entry.format,
cleanDist: false,
declaration: !!entry.declaration,
pattern: entry.pattern,
// @ts-ignore
ext: entry.ext,
...entry,
};
await ctx.hooks.callHook(
"mkdist:entry:options",
Expand Down
6 changes: 2 additions & 4 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ export interface RollupBuildEntry extends BaseBuildEntry {
builder: "rollup";
}

export interface MkdistBuildEntry extends BaseBuildEntry {
type _BaseAndMkdist = BaseBuildEntry & MkdistOptions;
export interface MkdistBuildEntry extends _BaseAndMkdist {
builder: "mkdist";
format?: "esm" | "cjs";
ext?: "cjs" | "mjs" | "js" | "ts";
pattern?: string | string[];
}

export type BuildEntry =
Expand Down

0 comments on commit f40a889

Please sign in to comment.