File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,16 @@ const defaultMainFields = [
55
55
'main' ,
56
56
]
57
57
58
+ const defaultConditionNames = [
59
+ 'types' ,
60
+ 'import' ,
61
+ 'require' ,
62
+ 'node' ,
63
+ 'node-addons' ,
64
+ 'browser' ,
65
+ 'default' ,
66
+ ]
67
+
58
68
export const interfaceVersion = 2
59
69
60
70
export interface TsResolverOptions
@@ -63,6 +73,7 @@ export interface TsResolverOptions
63
73
project ?: string [ ] | string
64
74
extensions ?: string [ ]
65
75
packageFilter ?: ( pkg : Record < string , string > ) => Record < string , string >
76
+ conditionNamesMapper ?: Record < string , string [ ] >
66
77
}
67
78
68
79
const fileSystem = fs as FileSystem
@@ -88,6 +99,7 @@ export function resolve(
88
99
...options ,
89
100
extensions : options ?. extensions ?? defaultExtensions ,
90
101
mainFields : options ?. mainFields ?? defaultMainFields ,
102
+ conditionNames : options ?. conditionNames ?? defaultConditionNames ,
91
103
fileSystem,
92
104
useSyncFileSystemCalls : true ,
93
105
}
You can’t perform that action at this time.
0 commit comments