Skip to content

Commit

Permalink
don't shorten node_modules to ~
Browse files Browse the repository at this point in the history
it's confusing
  • Loading branch information
sokra committed Jan 31, 2017
1 parent 0445b15 commit db9a24a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions lib/RequestShortener.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class RequestShortener {
this.buildinsRegExp = buildinsRegExp;
}

this.nodeModulesRegExp = /\/node_modules\//g;
this.indexJsRegExp = /\/index.js(!|\?|\(query\))/g;
}

Expand All @@ -49,7 +48,6 @@ class RequestShortener {
request = request.replace(this.parentDirectoryRegExp, "!..");
if(!this.buildinsAsModule && this.buildinsRegExp)
request = request.replace(this.buildinsRegExp, "!(webpack)");
request = request.replace(this.nodeModulesRegExp, "/~/");
request = request.replace(this.indexJsRegExp, "$1");
return request.replace(/^!|!$/, "");
}
Expand Down
8 changes: 4 additions & 4 deletions test/statsCases/separate-css-bundle/expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Child
[1] (webpack)/test/statsCases/separate-css-bundle/a/index.js 23 bytes {0} [built]
Child extract-text-webpack-plugin:
chunk {0} extract-text-webpack-plugin-output-filename 1.65 kB [entry] [rendered]
[0] (webpack)/~/css-loader/lib/css-base.js 1.46 kB {0} [built]
[1] (webpack)/~/css-loader!(webpack)/test/statsCases/separate-css-bundle/a/file.css 192 bytes {0} [built]
[0] (webpack)/node_modules/css-loader/lib/css-base.js 1.46 kB {0} [built]
[1] (webpack)/node_modules/css-loader!(webpack)/test/statsCases/separate-css-bundle/a/file.css 192 bytes {0} [built]
Child
Hash: 9661b5ac14d1a0a5b50a
Time: Xms
Expand All @@ -23,5 +23,5 @@ Child
[1] (webpack)/test/statsCases/separate-css-bundle/b/index.js 23 bytes {0} [built]
Child extract-text-webpack-plugin:
chunk {0} extract-text-webpack-plugin-output-filename 1.65 kB [entry] [rendered]
[0] (webpack)/~/css-loader/lib/css-base.js 1.46 kB {0} [built]
[1] (webpack)/~/css-loader!(webpack)/test/statsCases/separate-css-bundle/b/file.css 194 bytes {0} [built]
[0] (webpack)/node_modules/css-loader/lib/css-base.js 1.46 kB {0} [built]
[1] (webpack)/node_modules/css-loader!(webpack)/test/statsCases/separate-css-bundle/b/file.css 194 bytes {0} [built]

0 comments on commit db9a24a

Please sign in to comment.