Skip to content

Commit c69c21f

Browse files
committed
Merge pull request #580 from Gaelan/patch-1
Add support for moduleResolution.
2 parents de68e8e + da34870 commit c69c21f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/main/tsconfig/tsconfig.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ interface CompilerOptions {
3434
locale?: string;
3535
mapRoot?: string; // Optionally Specifies the location where debugger should locate map files after deployment
3636
module?: string;
37+
moduleResolution?: string;
3738
newLine?: string;
3839
noEmit?: boolean;
3940
noEmitHelpers?: boolean;
@@ -75,6 +76,7 @@ var compilerOptionsValidation: simpleValidator.ValidationInfo = {
7576
locals: { type: types.string },
7677
mapRoot: { type: types.string },
7778
module: { type: types.string, validValues: ['commonjs', 'amd', 'system', 'umd'] },
79+
moduleResolution: { type: types.string, validValues: ['classic', 'node'] },
7880
newLine: { type: types.string },
7981
noEmit: { type: types.boolean },
8082
noEmitHelpers: { type: types.boolean },
@@ -212,6 +214,7 @@ var typeScriptVersion = '1.5.0-beta';
212214
export var defaults: ts.CompilerOptions = {
213215
target: ts.ScriptTarget.ES5,
214216
module: ts.ModuleKind.CommonJS,
217+
moduleResolution: ts.ModuleResolutionKind.NodeJs,
215218
isolatedModules: false,
216219
jsx: ts.JsxEmit.React,
217220
experimentalDecorators: true,
@@ -238,6 +241,10 @@ var typescriptEnumMap = {
238241
'system': ts.ModuleKind.System,
239242
'umd': ts.ModuleKind.UMD,
240243
},
244+
moduleResolution: {
245+
'node': ts.ModuleResolutionKind.NodeJs,
246+
'classic': ts.ModuleResolutionKind.Classic
247+
},
241248
jsx: {
242249
'preserve': ts.JsxEmit.Preserve,
243250
'react': ts.JsxEmit.React

0 commit comments

Comments
 (0)