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) {
7373
7474 var result
7575 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 ) )
7980 } else {
8081 result = content . slice ( start , end ) . trim ( )
8182 }
@@ -91,15 +92,16 @@ module.exports = function (content) {
9192}
9293
9394function 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' )
103105}
104106
105107function getAttribute ( node , name ) {
Original file line number Diff line number Diff line change @@ -141,7 +141,6 @@ describe('vue-loader', function () {
141141 getFile ( 'test.build.js.map' , function ( map ) {
142142 var smc = new SourceMapConsumer ( JSON . parse ( map ) )
143143 getFile ( 'test.build.js' , function ( code ) {
144- console . log ( code )
145144 var line
146145 code . split ( '\n' ) . some ( function ( l , i ) {
147146 if ( l . indexOf ( 'Hello from Component A' ) > - 1 ) {
You can’t perform that action at this time.
0 commit comments