Skip to content

Commit c0c3976

Browse files
committed
[bugfix] add resourceQuery check logic.
1 parent a6c2b4d commit c0c3976

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/loader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ module.exports = function (content) {
5656
// var isServer = false
5757
var loaderContext = this
5858
var query = loaderUtils.getOptions(this)
59-
var params = loaderUtils.parseQuery(this.resourceQuery)
59+
var params = this.resourceQuery && loaderUtils.parseQuery(this.resourceQuery)
6060
var options = this.options.__vueOptions__ = Object.assign({}, this.options.vue, this.vue, query)
6161
var filePath = this.resourcePath
6262
var fileName = path.basename(filePath)
@@ -395,7 +395,7 @@ module.exports = function (content) {
395395
'}'
396396
}
397397

398-
if (params.entry) {
398+
if (params && params.entry) {
399399
output += 'module.exports.el = \'' + params.entry + '\'\n' +
400400
'new Vue(module.exports)\n'
401401
}

0 commit comments

Comments
 (0)