Skip to content

Commit a81274e

Browse files
authored
Merge branch '8.x-webpack4' into 8.x
2 parents fa4f4fa + a0bd983 commit a81274e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
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

lib/style-rewriter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module.exports = function (css, map) {
3333
var cb = this.async()
3434

3535
var query = loaderUtils.getOptions(this) || {}
36-
var options = this.options.vue || {}
36+
var options = this.options && this.options.vue || {}
3737
var autoprefixOptions = options.autoprefixer
3838
var postcssOptions = options.postcss
3939

@@ -58,7 +58,7 @@ module.exports = function (css, map) {
5858
autoprefixOptions = assign(
5959
{},
6060
// also respect autoprefixer-loader options
61-
this.options.autoprefixer,
61+
this.options && this.options.autoprefixer,
6262
autoprefixOptions
6363
)
6464
var autoprefixer = require('autoprefixer')(autoprefixOptions)

0 commit comments

Comments
 (0)