File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -73,9 +73,10 @@ module.exports = function (content) {
73
73
74
74
var result
75
75
if ( type === 'script' ) {
76
- result = commentScript ( content . slice ( 0 , start ) ) +
77
- content . slice ( start , end ) +
78
- commentScript ( content . slice ( end ) )
76
+ result =
77
+ commentScript ( content . slice ( 0 , start ) ) +
78
+ content . slice ( start , end ) +
79
+ commentScript ( content . slice ( end ) )
79
80
} else {
80
81
result = content . slice ( start , end ) . trim ( )
81
82
}
@@ -91,15 +92,16 @@ module.exports = function (content) {
91
92
}
92
93
93
94
function commentScript ( content ) {
94
- return content . split ( / \n \r | \n | \r / g)
95
- . map ( function ( line ) {
96
- if ( line . trim ( ) === '' ) {
97
- return line
98
- } else {
99
- return '// ' + line
100
- }
101
- } )
102
- . join ( '\n' )
95
+ return content
96
+ . split ( / \n \r | \n | \r / g)
97
+ . map ( function ( line ) {
98
+ if ( line . trim ( ) === '' ) {
99
+ return line
100
+ } else {
101
+ return '// ' + line
102
+ }
103
+ } )
104
+ . join ( '\n' )
103
105
}
104
106
105
107
function getAttribute ( node , name ) {
Original file line number Diff line number Diff line change @@ -141,7 +141,6 @@ describe('vue-loader', function () {
141
141
getFile ( 'test.build.js.map' , function ( map ) {
142
142
var smc = new SourceMapConsumer ( JSON . parse ( map ) )
143
143
getFile ( 'test.build.js' , function ( code ) {
144
- console . log ( code )
145
144
var line
146
145
code . split ( '\n' ) . some ( function ( l , i ) {
147
146
if ( l . indexOf ( 'Hello from Component A' ) > - 1 ) {
You can’t perform that action at this time.
0 commit comments