Skip to content

Commit bd525fd

Browse files
committed
avoid multiple webpack runs complaining about unknown option (fix #824)
1 parent 1573403 commit bd525fd

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/loader.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,15 @@ module.exports = function (content) {
4949

5050
var loaderContext = this
5151
var query = loaderUtils.getOptions(this) || {}
52-
var options = this.options.__vueOptions__ = Object.assign({}, this.options.vue, this.vue, query)
53-
var rawRequest = getRawRequest(this, options.excludedPreLoaders)
52+
var options = Object.assign({}, this.options.vue, this.vue, query)
53+
// #824 avoid multiple webpack runs complaining about unknown option
54+
Object.defineProperty(this.options, '__vueOptions__', {
55+
value: options,
56+
enumerable: false,
57+
configurable: true
58+
})
5459

60+
var rawRequest = getRawRequest(this, options.excludedPreLoaders)
5561
var filePath = this.resourcePath
5662
var fileName = path.basename(filePath)
5763

0 commit comments

Comments
 (0)