Skip to content

Commit 1414036

Browse files
committed
Upgrade to webpack 2.2.0
1 parent 480a7cb commit 1414036

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

index.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@ function ExtractTextPlugin(options) {
128128
}
129129
module.exports = ExtractTextPlugin;
130130

131-
// modified from webpack/lib/LoadersList.js
132-
function getLoaderWithQuery(loader) {
133-
if(isString(loader)) return loader;
134-
if(!loader.query) return loader.loader;
135-
var query = isString(loader.query) ? loader.query : JSON.stringify(loader.query);
136-
return loader.loader + "?" + query;
131+
function getLoaderWithObject(loader) {
132+
if (isString(loader)) {
133+
return {loader: loader};
134+
}
135+
136+
return loader;
137137
}
138138

139139
function mergeOptions(a, b) {
@@ -198,8 +198,7 @@ ExtractTextPlugin.prototype.extract = function(options) {
198198
delete options.fallbackLoader;
199199
return [this.loader(options)]
200200
.concat(before, loader)
201-
.map(getLoaderWithQuery)
202-
.join("!");
201+
.map(getLoaderWithObject);
203202
}
204203

205204
ExtractTextPlugin.extract = ExtractTextPlugin.prototype.extract.bind(ExtractTextPlugin);

0 commit comments

Comments
 (0)