Skip to content

Commit 4704b47

Browse files
committed
Use global options for localsLoader
1 parent e250b65 commit 4704b47

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/localsLoader.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ var loaderUtils = require("loader-utils");
66
var processCss = require("./processCss");
77
var getImportPrefix = require("./getImportPrefix");
88
var compileExports = require("./compile-exports");
9+
var assign = require("object-assign");
910

1011

1112
module.exports = function(content) {
1213
if(this.cacheable) this.cacheable();
1314
var callback = this.async();
14-
var query = loaderUtils.parseQuery(this.query);
15+
var loaderOptions = loaderUtils.parseQuery(this.query);
16+
var configKey = loaderOptions.config || "cssLoader";
17+
var globalOptions = this.options[configKey] || {};
18+
var query = assign({}, globalOptions, loaderOptions);
1519
var moduleMode = query.modules || query.module;
1620
var camelCaseKeys = query.camelCase || query.camelcase;
1721

0 commit comments

Comments
 (0)