Skip to content

Commit

Permalink
fix: pass resolver to localsLoader (options.alias) (#601)
Browse files Browse the repository at this point in the history
  • Loading branch information
liambuchanan authored and michael-ciniawsky committed Aug 30, 2017
1 parent d18ee04 commit 8f1b57c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/localsLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var loaderUtils = require("loader-utils");
var processCss = require("./processCss");
var getImportPrefix = require("./getImportPrefix");
var compileExports = require("./compile-exports");
var createResolver = require("./createResolver");


module.exports = function(content) {
Expand All @@ -14,12 +15,14 @@ module.exports = function(content) {
var query = loaderUtils.getOptions(this) || {};
var moduleMode = query.modules || query.module;
var camelCaseKeys = query.camelCase || query.camelcase;
var resolve = createResolver(query.alias);

processCss(content, null, {
mode: moduleMode ? "local" : "global",
query: query,
minimize: this.minimize,
loaderContext: this
loaderContext: this,
resolve: resolve
}, function(err, result) {
if(err) return callback(err);

Expand Down

0 comments on commit 8f1b57c

Please sign in to comment.