File tree 6 files changed +11
-10
lines changed
test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs
6 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 28
28
},
29
29
"homepage" : " https://github.com/TypeStrong/ts-loader" ,
30
30
"dependencies" : {
31
- "arrify" : " ^1.0.0" ,
32
31
"colors" : " ^1.0.3" ,
33
32
"enhanced-resolve" : " ^0.9.0" ,
34
33
"loader-utils" : " ^0.2.6" ,
Original file line number Diff line number Diff line change 1
1
import path = require( 'path' ) ;
2
2
import loaderUtils = require( 'loader-utils' ) ;
3
3
import objectAssign = require( 'object-assign' ) ;
4
- import arrify = require( 'arrify' ) ;
5
4
require ( 'colors' ) ;
6
5
7
6
import instances = require( './instances' ) ;
@@ -65,7 +64,7 @@ function makeOptions(loader: interfaces.Webpack) {
65
64
appendTsSuffixTo : [ ] ,
66
65
entryFileIsJs : false ,
67
66
} , configFileOptions , queryOptions ) ;
68
- options . ignoreDiagnostics = arrify ( options . ignoreDiagnostics ) . map ( Number ) ;
67
+ options . ignoreDiagnostics = utils . arrify ( options . ignoreDiagnostics ) . map ( Number ) ;
69
68
options . logLevel = options . logLevel . toUpperCase ( ) ;
70
69
71
70
// differentiate the TypeScript instance based on the webpack instance
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -131,3 +131,11 @@ export function collectAllDependencies(
131
131
}
132
132
return Object . keys ( result ) ;
133
133
}
134
+
135
+ export function arrify < T > ( val : T | T [ ] ) {
136
+ if ( val === null || val === undefined ) {
137
+ return [ ] ;
138
+ }
139
+
140
+ return Array . isArray ( val ) ? val : [ val ] ;
141
+ } ;
Original file line number Diff line number Diff line change @@ -8,5 +8,5 @@ Module build failed: Error: Typescript emitted no output for node_modules\a\inde
8
8
You should not need to recompile .ts files in node_modules.
9
9
Please contact the package author to advise them to use --declaration --outDir.
10
10
More https://github.com/Microsoft/TypeScript/issues/12358
11
- at Object.loader (dist\index.js:30 :15)
11
+ at Object.loader (dist\index.js:29 :15)
12
12
@ ./.test/nodeModulesMeaningfulErrorWhenImportingTs/app.ts 2:8-20
Original file line number Diff line number Diff line change @@ -8,5 +8,5 @@ Module build failed: Error: Typescript emitted no output for node_modules\a\inde
8
8
You should not need to recompile .ts files in node_modules.
9
9
Please contact the package author to advise them to use --declaration --outDir.
10
10
More https://github.com/Microsoft/TypeScript/issues/12358
11
- at Object.loader (dist\index.js:30 :15)
11
+ at Object.loader (dist\index.js:29 :15)
12
12
@ ./.test/nodeModulesMeaningfulErrorWhenImportingTs/app.ts 2:8-20
You can’t perform that action at this time.
0 commit comments