Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ function ensureTypeScriptInstance(loaderOptions: LoaderOptions, loader: any): {
};

var compilerOptions: typescript.CompilerOptions = {
module: 1 /* CommonJS */
module: typescript.ModuleKind.CommonJS /* CommonJS */
};

// Load any available tsconfig.json file
Expand Down Expand Up @@ -273,8 +273,8 @@ function ensureTypeScriptInstance(loaderOptions: LoaderOptions, loader: any): {
var libFileName = 'lib.d.ts';

// Special handling for ES6 targets
if (compilerOptions.target == 2 /* ES6 */) {
compilerOptions.module = 0 /* None */;
if (compilerOptions.target == typescript.ScriptTarget.ES6 /* ES6 */) {
compilerOptions.module = typescript.ModuleKind.None /* None */;
libFileName = 'lib.es6.d.ts';
}

Expand Down Expand Up @@ -305,8 +305,8 @@ function ensureTypeScriptInstance(loaderOptions: LoaderOptions, loader: any): {
});

let newLine =
compilerOptions.newLine === 0 /* CarriageReturnLineFeed */ ? '\r\n' :
compilerOptions.newLine === 1 /* LineFeed */ ? '\n' :
compilerOptions.newLine === typescript.NewLineKind.CarriageReturnLineFeed /* CarriageReturnLineFeed */ ? '\r\n' :
compilerOptions.newLine === typescript.NewLineKind.LineFeed /* LineFeed */ ? '\n' :
os.EOL;

// make a (sync) resolver that follows webpack's rules
Expand Down