File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 37
37
"async" : " ~0.9.0" ,
38
38
"loader-utils" : " ^0.2.5" ,
39
39
"lodash" : " ^3.8.0" ,
40
- "source-map" : " ^0.1.41 " ,
40
+ "source-map" : " ^0.5.6 " ,
41
41
"webpack-dev-middleware" : " ^1.12.0"
42
42
},
43
43
"devDependencies" : {
Original file line number Diff line number Diff line change 1
- //var path = require('path')
2
- var SourceNode = require ( 'source-map' ) . SourceNode
1
+ var sourceMap = require ( 'source-map' )
3
2
var loaderUtils = require ( 'loader-utils' )
4
3
4
+ var SourceNode = sourceMap . SourceNode
5
+ var SourceMapConsumer = sourceMap . SourceMapConsumer
6
+
5
7
module . exports = function ( content , map ) {
6
8
this . cacheable ( )
7
9
8
10
var sourceNode
9
11
var id = this . options . name
10
12
11
13
if ( ! id ) {
12
- this . callback ( null , content , map )
14
+ return this . callback ( null , content , map )
13
15
}
14
16
15
17
if ( map ) {
16
- sourceNode = SourceNode . fromSourceWithMap ( content , map )
18
+ sourceNode = SourceNode . fromStringWithSourceMap ( content , new SourceMapConsumer ( map ) )
17
19
} else {
18
20
var fileName = loaderUtils . getRemainingRequest ( this )
19
21
You can’t perform that action at this time.
0 commit comments