diff --git a/lib/loader.js b/lib/loader.js index dd5d2483..f865f429 100644 --- a/lib/loader.js +++ b/lib/loader.js @@ -24,7 +24,7 @@ module.exports = function (source) { // The following part renders the tempalte with lodash as aminimalistic loader // // Get templating options - const options = loaderUtils.parseQuery(this.query); + const options = this.query !== '' ? loaderUtils.parseQuery(this.query) : {}; // Webpack 2 does not allow with() statements, which lodash templates use to unwrap // the parameters passed to the compiled template inside the scope. We therefore // need to unwrap them ourselves here. This is essentially what lodash does internally