Skip to content

Commit

Permalink
fix: type
Browse files Browse the repository at this point in the history
  • Loading branch information
luhc228 committed Oct 12, 2023
1 parent 7ea52d7 commit 44c2a50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/pkg/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export interface BundleUserConfig {
/**
* Weather or not compile the dependencies in node_modules.
*/
compileDependencies?: boolean | RegExp[] | string[];
compileDependencies?: boolean | Array<RegExp | string>;
}

export interface UserConfig {
Expand Down
2 changes: 1 addition & 1 deletion packages/pkg/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export const stringifyObject = (obj: PlainObject) => {
};

// @ref: It will pass to createScriptFilter function
export function getIncludeNodeModules(compileDependencies: boolean | RegExp[] | string[]): RegExp[] {
export function getIncludeNodeModules(compileDependencies: boolean | Array<RegExp | string>): RegExp[] {
if (compileDependencies === true || (Array.isArray(compileDependencies) && compileDependencies.length === 0)) {
return [/node_modules/];
}
Expand Down

0 comments on commit 44c2a50

Please sign in to comment.