File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ var parser = new parse5.Parser(null, { locationInfo: true })
33
44module . exports = function ( content ) {
55 this . cacheable ( )
6- var cb = this . async ( )
6+
77 var output = {
88 template : [ ] ,
99 style : [ ] ,
@@ -24,10 +24,10 @@ module.exports = function (content) {
2424 ( type === 'script' || type === 'template' ) &&
2525 output [ type ] . length > 0
2626 ) {
27- return cb ( new Error (
27+ throw new Error (
2828 '[vue-loader] Only one <script> or <template> tag is ' +
2929 'allowed inside a Vue component.'
30- ) )
30+ )
3131 }
3232
3333 // handle src imports
@@ -88,7 +88,7 @@ module.exports = function (content) {
8888 } )
8989 } )
9090
91- cb ( null , 'module.exports = ' + JSON . stringify ( output ) )
91+ return 'module.exports = ' + JSON . stringify ( output )
9292}
9393
9494function commentScript ( content , lang ) {
You can’t perform that action at this time.
0 commit comments