Skip to content
This repository was archived by the owner on May 16, 2024. It is now read-only.

Commit f7a7e34

Browse files
committed
add checking on this.options object and utils.getOptions function existence for webpack 4
1 parent 6fea14b commit f7a7e34

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ module.exports = function (source) {
1010
this.cacheable && this.cacheable();
1111

1212
var query = typeof this.query === 'object' ? this.query : utils.parseQuery(this.query);
13-
var opts = merge(this.options['ejs-compiled-loader'] || {}, query);
13+
var _options = typeof this.options === 'object' ? this.options['ejs-compiled-loader'] || {} : {};
14+
_options = typeof utils.getOptions === 'function' ? merge(utils.getOptions(this), _options) : _options;
15+
var opts = merge(_options, query);
1416
opts.client = true;
1517

1618
// Skip compile debug for production when running with

0 commit comments

Comments
 (0)