Skip to content

Commit a1c0c37

Browse files
committed
get rid of this weird name
1 parent 57c3323 commit a1c0c37

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
module: {
99
loaders: [
1010
{ test: /\.css$/, loader: ExtractTextPlugin.extract({
11-
notExtractLoader: "style-loader",
11+
fallbackLoader: "style-loader",
1212
loader: "css-loader"
1313
}) }
1414
]
@@ -60,7 +60,7 @@ ExtractTextPlugin.extract(options: loader | object)
6060
Creates an extracting loader from an existing loader. Supports loaders of type `{ loader: string; query: object }`.
6161

6262
* `options.loader: string | object | loader[]` _(required)_ the loader(s) that should be used for converting the resource to a css exporting module
63-
* `options.notExtractLoader: string | object | loader[]` the loader(s) that should be used when the css is not extracted (i.e. in an additional chunk when `allChunks: false`)
63+
* `options.fallbackLoader: string | object | loader[]` the loader(s) that should be used when the css is not extracted (i.e. in an additional chunk when `allChunks: false`)
6464
* `options.publicPath: string` override the `publicPath` setting for this loader
6565

6666
There is also an `extract` function on the instance. You should use this if you have more than one `ExtractTextPlugin`.

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,17 +173,17 @@ ExtractTextPlugin.prototype.extract = function(options) {
173173
"Example: if your old code looked like this:\n" +
174174
" ExtractTextPlugin.extract('style-loader', 'css-loader')\n\n" +
175175
"You would change it to:\n" +
176-
" ExtractTextPlugin.extract({ notExtractLoader: 'style-loader', loader: 'css-loader' })\n\n" +
176+
" ExtractTextPlugin.extract({ fallbackLoader: 'style-loader', loader: 'css-loader' })\n\n" +
177177
"The available options are:\n" +
178178
" loader: string | object | loader[]\n" +
179-
" notExtractLoader: string | object | loader[]\n" +
179+
" fallbackLoader: string | object | loader[]\n" +
180180
" publicPath: string\n");
181181
}
182182
if(Array.isArray(options) || isString(options) || typeof options.query === "object") {
183183
options = { loader: options };
184184
}
185185
var loader = options.loader;
186-
var before = options.notExtractLoader || [];
186+
var before = options.fallbackLoader || [];
187187
if(isString(loader)) {
188188
loader = loader.split("!");
189189
}
@@ -194,7 +194,7 @@ ExtractTextPlugin.prototype.extract = function(options) {
194194
}
195195
options = mergeOptions({omit: before.length, remove: true}, options);
196196
delete options.loader;
197-
delete options.notExtractLoader;
197+
delete options.fallbackLoader;
198198
return [this.loader(options)]
199199
.concat(before, loader)
200200
.map(getLoaderWithQuery)

test/cases/simple-query-object/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
module: {
55
loaders: [
66
{ test: /\.css$/, loader: ExtractTextPlugin.extract({
7-
notExtractLoader: "style-loader",
7+
fallbackLoader: "style-loader",
88
loader: { loader: "css-loader", query: {
99
sourceMap: true
1010
} }

0 commit comments

Comments
 (0)