mirror of https://github.com/webpack/webpack.git
shorter filenames in output
This commit is contained in:
parent
31f92329fd
commit
bd4017b05d
|
|
@ -211,6 +211,9 @@ if(!output) {
|
|||
cwdParent = new RegExp("^" + cwdParent + "|(!)" + cwdParent, "g");
|
||||
buildins = buildins.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
||||
buildins = new RegExp("^" + buildins + "|(!)" + buildins, "g");
|
||||
var node_modulesRegExpA = /\/node_modules\//g;
|
||||
var node_modulesRegExpB = /\\node_modules\\/g;
|
||||
var index_jsRegExp = /[\\\/]index.js!/g;
|
||||
function compressFilename(filename) {
|
||||
if(!filename)
|
||||
return filename;
|
||||
|
|
@ -219,8 +222,10 @@ if(!output) {
|
|||
filename = filename.replace(cwd, "!.");
|
||||
if(!buildinsAsModule)
|
||||
filename = filename.replace(buildins, "!(webpack)");
|
||||
filename = filename.replace(cwdParent, "!..");
|
||||
return filename.replace(/^!/, "");
|
||||
filename = filename.replace(node_modulesRegExpA, "/~/");
|
||||
filename = filename.replace(node_modulesRegExpB, "\\~\\");
|
||||
filename = filename.replace(index_jsRegExp, "!");
|
||||
return filename.replace(/^!|!$/, "");
|
||||
}
|
||||
if(stats.fileModules) {
|
||||
console.log();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "webpack",
|
||||
"version": "0.3.11",
|
||||
"version": "0.3.12",
|
||||
"author": "Tobias Koppers @sokra",
|
||||
"description": "Packs CommonJs Modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loading of js, json, jade, coffee, css, ... out of the box and more with custom loaders.",
|
||||
"dependencies": {
|
||||
|
|
|
|||
Loading…
Reference in New Issue