Merge pull request #5353 from webpack/deps/extract-text-webpack-plugin

upgrade extract-text-webpack-plugin
This commit is contained in:
Tobias Koppers 2017-07-24 17:31:41 +02:00 committed by GitHub
commit 008ac786fe
7 changed files with 26 additions and 24 deletions

View File

@ -7,6 +7,7 @@
const RequestShortener = require("./RequestShortener");
const SizeFormatHelpers = require("./SizeFormatHelpers");
const formatLocation = require("./formatLocation");
const identifierUtils = require("./util/identifier");
const optionOrFallback = (optionValue, fallbackValue) => typeof optionValue !== "undefined" ? optionValue : fallbackValue;
@ -80,7 +81,8 @@ class Stats {
typeof options.all !== "undefined" ? options.all : def;
const compilation = this.compilation;
const requestShortener = new RequestShortener(optionOrFallback(options.context, process.cwd()));
const context = optionOrFallback(options.context, process.cwd());
const requestShortener = new RequestShortener(context);
const showPerformance = optionOrLocalFallback(options.performance, true);
const showHash = optionOrLocalFallback(options.hash, true);
const showVersion = optionOrLocalFallback(options.version, true);
@ -391,7 +393,8 @@ class Stats {
const obj = new Stats(child).toJson(childOptions, forToString);
delete obj.hash;
delete obj.version;
obj.name = child.name;
if(child.name)
obj.name = identifierUtils.makePathsRelative(context, child.name, compilation.cache);
return obj;
});
}

View File

@ -42,7 +42,7 @@
"eslint": "^4.3.0",
"eslint-plugin-node": "^5.1.1",
"express": "~4.13.1",
"extract-text-webpack-plugin": "^2.0.0-beta",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^0.11.2",
"i18n-webpack-plugin": "^1.0.0",
"istanbul": "^0.4.5",

View File

@ -53,7 +53,7 @@ describe("HotTestCases", () => {
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: "style-loader",
loader: "css-loader"
use: "css-loader"
})
}]
},

View File

@ -11,7 +11,7 @@ Child
[3] (webpack)/node_modules/css-loader/lib/css-base.js 2.26 kB [built]
[4] (webpack)/node_modules/style-loader/lib/addStyles.js 8.66 kB [built]
[5] (webpack)/node_modules/style-loader/lib/urls.js 3.01 kB [built]
Child extract-text-webpack-plugin:
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js!test/statsCases/separate-css-bundle/a/file.css:
[0] (webpack)/node_modules/css-loader!(webpack)/test/statsCases/separate-css-bundle/a/file.css 199 bytes {0} [built]
[1] (webpack)/node_modules/css-loader/lib/css-base.js 2.26 kB {0} [built]
Child
@ -26,6 +26,6 @@ Child
[3] (webpack)/node_modules/css-loader/lib/css-base.js 2.26 kB [built]
[4] (webpack)/node_modules/style-loader/lib/addStyles.js 8.66 kB [built]
[5] (webpack)/node_modules/style-loader/lib/urls.js 3.01 kB [built]
Child extract-text-webpack-plugin:
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js!test/statsCases/separate-css-bundle/b/file.css:
[0] (webpack)/node_modules/css-loader!(webpack)/test/statsCases/separate-css-bundle/b/file.css 201 bytes {0} [built]
[1] (webpack)/node_modules/css-loader/lib/css-base.js 2.26 kB {0} [built]

View File

@ -7,7 +7,7 @@ var moduleConfig = {
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: "style-loader",
loader: "css-loader"
use: "css-loader"
})
}
]

View File

@ -6,7 +6,7 @@ module.exports = {
{
test: /\.css$/,
loader: ExtractTextPlugin.extract({
loader: "css-loader"
use: "css-loader"
})
}
]

View File

@ -66,7 +66,7 @@ ajv-keywords@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.0.0.tgz#a37d02f845b6f52569804164270b24cb6c6cee61"
ajv@^4.11.2, ajv@^4.7.0, ajv@^4.9.1:
ajv@^4.7.0, ajv@^4.9.1:
version "4.11.8"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536"
dependencies:
@ -239,6 +239,12 @@ async@^2.1.2:
dependencies:
lodash "^4.14.0"
async@^2.4.1:
version "2.5.0"
resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d"
dependencies:
lodash "^4.14.0"
async@~0.9.0:
version "0.9.2"
resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d"
@ -1436,14 +1442,14 @@ extglob@^0.3.1:
dependencies:
is-extglob "^1.0.0"
extract-text-webpack-plugin@^2.0.0-beta:
version "2.1.0"
resolved "https://registry.yarnpkg.com/extract-text-webpack-plugin/-/extract-text-webpack-plugin-2.1.0.tgz#69315b885f876dbf96d3819f6a9f1cca7aebf159"
extract-text-webpack-plugin@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.0.tgz#90caa7907bc449f335005e3ac7532b41b00de612"
dependencies:
ajv "^4.11.2"
async "^2.1.2"
loader-utils "^1.0.2"
webpack-sources "^0.1.0"
async "^2.4.1"
loader-utils "^1.1.0"
schema-utils "^0.3.0"
webpack-sources "^1.0.1"
extsprintf@1.0.2:
version "1.0.2"
@ -3859,7 +3865,7 @@ sort-keys@^1.0.0:
dependencies:
is-plain-obj "^1.0.0"
source-list-map@^0.1.7, source-list-map@~0.1.7:
source-list-map@^0.1.7:
version "0.1.8"
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106"
@ -4355,13 +4361,6 @@ webpack-dev-middleware@^1.9.0:
path-is-absolute "^1.0.0"
range-parser "^1.0.3"
webpack-sources@^0.1.0:
version "0.1.5"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.1.5.tgz#aa1f3abf0f0d74db7111c40e500b84f966640750"
dependencies:
source-list-map "~0.1.7"
source-map "~0.5.3"
webpack-sources@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.0.1.tgz#c7356436a4d13123be2e2426a05d1dad9cbe65cf"