File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ function compileTypeScript(filePath) {
52
52
return fs . readFileSync ( outputPath , { encoding : 'utf8' } ) ;
53
53
}
54
54
55
- function withLocalImmutable ( jsSrc ) {
55
+ function withLocalImmutable ( filePath , jsSrc ) {
56
56
return jsSrc . replace (
57
57
/ r e q u i r e \( ' i m m u t a b l e / g,
58
58
"require('" + path . relative ( path . dirname ( filePath ) , process . cwd ( ) )
@@ -62,11 +62,11 @@ function withLocalImmutable(jsSrc) {
62
62
module . exports = {
63
63
process : function ( src , filePath ) {
64
64
if ( filePath . match ( / \. t s $ / ) && ! filePath . match ( / \. d \. t s $ / ) ) {
65
- return withLocalImmutable ( compileTypeScript ( filePath ) ) ;
65
+ return withLocalImmutable ( filePath , compileTypeScript ( filePath ) ) ;
66
66
}
67
67
68
68
if ( filePath . match ( / \. j s $ / ) && ~ filePath . indexOf ( '/__tests__/' ) ) {
69
- return withLocalImmutable ( react . transform ( src , { harmony : true } ) ) ;
69
+ return withLocalImmutable ( filePath , react . transform ( src , { harmony : true } ) ) ;
70
70
}
71
71
72
72
return src ;
You can’t perform that action at this time.
0 commit comments