Skip to content

Commit 8253348

Browse files
authored
Fix typing of mainFields option (#106)
1 parent 84eeecd commit 8253348

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ An array of the extensions that will be tried during resolve. Ideally this would
7575

7676
This allows you to override the `baseUrl` found in tsconfig.json. The baseUrl specifies from which directory `paths` should be resolved. So this option enabled you to resolve from another directory than the one where tsconfig.json is located. This can be useful if you want to use webpack with `tsc --watch` instead of a typescript loader. If this option is `undefined` then the `baseUrl` from tsconfig.json will be used.
7777

78-
#### mainFields _(string[]) (default=["main"])_
78+
#### mainFields _((string | string[])[]) (default=["main"])_
7979

8080
An array of the field names that should be considered when resolving packages. Ideally this would be the same as the mainFields from the webpack config but it seems resolver plug-ins does not have access to this infomration so you need to specify it again for the plugin.
8181

src/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export interface Options {
99
readonly logInfoToStdOut: boolean;
1010
readonly context: string | undefined;
1111
readonly colors: boolean;
12-
readonly mainFields: string[];
12+
readonly mainFields: (string | string[])[];
1313
readonly references: string[] | undefined;
1414
}
1515

0 commit comments

Comments
 (0)