File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ let id = 0;
77const NS = path . dirname ( fs . realpathSync ( __filename ) ) ;
88
99const getLoaderName = path => {
10- const nodeModuleName = / \/ n o d e _ m o d u l e s \/ ( [ ^ \/ ] + ) / . exec ( path ) ;
10+ const standardPath = path . replace ( / \\ / g, "/" ) ;
11+ const nodeModuleName = / \/ n o d e _ m o d u l e s \/ ( [ ^ \/ ] + ) / . exec ( standardPath ) ;
1112 return ( nodeModuleName && nodeModuleName [ 1 ] ) || "" ;
1213} ;
1314
@@ -36,7 +37,7 @@ module.exports.pitch = function() {
3637 } ) ;
3738 return asyncCallback . apply ( this , arguments ) ;
3839 } ;
39- } . bind ( this )
40+ } . bind ( this ) ,
4041 } ) ;
4142
4243 callback ( {
Original file line number Diff line number Diff line change @@ -51,10 +51,12 @@ module.exports.getLoaderNames = loaders =>
5151 ? loaders
5252 . map ( l => l . loader || l )
5353 . map ( l =>
54- l . replace (
55- / ^ .* \/ n o d e _ m o d u l e s \/ ( @ [ a - z 0 - 9 ] [ \w - . ] + \/ [ a - z 0 - 9 ] [ \w - . ] * | [ ^ \/ ] + ) .* $ / ,
56- ( _ , m ) => m
57- )
54+ l
55+ . replace ( / \\ / g, "/" )
56+ . replace (
57+ / ^ .* \/ n o d e _ m o d u l e s \/ ( @ [ a - z 0 - 9 ] [ \w - . ] + \/ [ a - z 0 - 9 ] [ \w - . ] * | [ ^ \/ ] + ) .* $ / ,
58+ ( _ , m ) => m
59+ )
5860 )
5961 . filter ( l => ! l . includes ( "speed-measure-webpack-plugin" ) )
6062 : [ "modules with no loaders" ] ;
You can’t perform that action at this time.
0 commit comments