Skip to content

Commit

Permalink
fix(okam): export BuildParams (#1073)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc authored Apr 22, 2024
1 parent aee0baf commit 4aec03f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions packages/mako/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ import * as binding from '../binding';
import { ForkTSChecker as ForkTSChecker } from './forkTSChecker';
import { LessLoaderOpts, lessLoader } from './lessLoader';

interface ExtraBuildParams {
less?: LessLoaderOpts;
forkTSChecker?: boolean;
}

type BuildParams = binding.BuildParams & ExtraBuildParams;
export { BuildParams };

// ref:
// https://github.com/vercel/next.js/pull/51883
function blockStdout() {
Expand All @@ -20,12 +28,7 @@ function blockStdout() {
}
}

interface ExtraBuildParams {
less?: LessLoaderOpts;
forkTSChecker?: boolean;
}

export async function build(params: binding.BuildParams & ExtraBuildParams) {
export async function build(params: BuildParams) {
blockStdout();

params.hooks = params.hooks || {};
Expand Down

0 comments on commit 4aec03f

Please sign in to comment.