File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 66var Promise = require ( 'bluebird' ) ;
77var TypeScriptWebpackHost = require ( './TypeScriptWebpackHost' ) ;
88var loaderUtils = require ( 'loader-utils' ) ;
9+ var path = require ( 'path' ) ;
910
1011function typescriptLoader ( text ) {
1112 if ( this . cacheable ) {
@@ -44,12 +45,14 @@ function typescriptLoader(text) {
4445function findResultFor ( output , filename ) {
4546 var text ;
4647 var sourceMap ;
48+ filename = path . normalize ( filename ) ;
4749 for ( var i = 0 ; i < output . outputFiles . length ; i ++ ) {
4850 var o = output . outputFiles [ i ] ;
49- if ( o . name . replace ( / \. j s $ / , '.ts' ) === filename ) {
51+ var outputFileName = path . normalize ( o . name ) ;
52+ if ( outputFileName . replace ( / \. j s $ / , '.ts' ) === filename ) {
5053 text = o . text ;
5154 }
52- if ( o . name . replace ( / \. j s .m a p $ / , '.ts' ) === filename ) {
55+ if ( outputFileName . replace ( / \. j s .m a p $ / , '.ts' ) === filename ) {
5356 sourceMap = o . text ;
5457 }
5558 }
You can’t perform that action at this time.
0 commit comments