Skip to content

Commit 8028617

Browse files
authored
webpack 4 Compatibility
1 parent 134a353 commit 8028617

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
@@ -29,13 +29,13 @@ module.exports = function (content) {
2929
this.cacheable()
3030
var loaderContext = this
3131
var query = loaderUtils.getOptions(this) || {}
32-
var options = Object.assign({}, this.options.vue, this.vue, query)
32+
var options = Object.assign({}, this.options && this.options.vue, this.vue, query)
3333
var filePath = this.resourcePath
3434
var fileName = path.basename(filePath)
3535
var moduleId = '_v-' + hash(filePath)
3636

3737
// respect user babel options
38-
if (this.options.babel) {
38+
if (this.options && this.options.babel) {
3939
defaultLoaders.js = 'babel-loader'
4040
}
4141

0 commit comments

Comments
 (0)