Skip to content

Commit 1fdf800

Browse files
authored
Merge branch 'master' into feature/import-chunk-name
2 parents 0b1b926 + 1b75d62 commit 1fdf800

155 files changed

Lines changed: 4764 additions & 3511 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.editorconfig‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ indent_size = 2
1616
indent_style = space
1717
indent_size = 2
1818

19+
[*.yaml]
20+
indent_style = space
21+
indent_size = 2
22+
1923
[test/cases/parsing/bom/bomfile.{css,js}]
2024
charset = utf-8-bom
2125

‎README.md‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,14 @@ or are automatically applied via regex from your webpack configuration.
205205
|<a href="https://github.com/vuejs/vue-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/vue-9.svg"></a>|![vue-npm]|Loads and compiles Vue Components|
206206
|<a href="https://github.com/JonDum/polymer-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/polymer.svg"></a>|![polymer-npm]|Process HTML & CSS with preprocessor of choice and `require()` Web Components like first-class modules|
207207
|<a href="https://github.com/TheLarkInn/angular2-template-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/angular-icon-1.svg"></a>|![angular-npm]| Loads and compiles Angular 2 Components|
208+
|<a href="https://github.com/riot/tag-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/riot.svg"></a>|![riot-npm]| Riot official webpack loader|
209+
208210

209211

210212
[vue-npm]: https://img.shields.io/npm/v/vue-loader.svg
211213
[polymer-npm]: https://img.shields.io/npm/v/polymer-loader.svg
212214
[angular-npm]: https://img.shields.io/npm/v/angular2-template-loader.svg
215+
[riot-npm]: https://img.shields.io/npm/v/riot-tag-loader.svg
213216

214217
### Performance
215218

@@ -332,7 +335,11 @@ This is how we use the donations:
332335

333336
We had other sources of donations before starting to use OpenCollective (or people that can't donate via OpenCollective). We want to acknowledge these sponsors and backers, but donations were not public and we are not sure of donors want to stay anonymous. So if you want to be in this list, just send a PR.
334337

335-
[Google Angular Team](https://angular.io/), [Architects.io](http://architects.io/), [Microapps](http://microapps.com/)
338+
[Google Angular Team](https://angular.io/), [Architects.io](http://architects.io/),
339+
<a href="https://moonmail.io" target="_blank" title="Email Marketing Software"><img
340+
src="https://static.moonmail.io/moonmail-logo.svg" height="30" alt="MoonMail"></a>
341+
<a href="https://monei.net" target="_blank" title="Best payment gateway rates"><img
342+
src="https://static.monei.net/monei-logo.svg" height="30" alt="MONEI"></a>
336343

337344
<h2 align="center">Sponsors</h2>
338345

‎examples/aggressive-merging/README.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,22 @@ module.exports = {
4848
moveToParents: true
4949
})
5050
]
51-
}
51+
};
5252
```
5353

5454
# Info
5555

5656
## Uncompressed
5757

5858
```
59-
Hash: 06f18f1663d1b6555aff
60-
Version: webpack 2.2.0-rc.2
59+
Hash: 75bcce350a8b5f748873
60+
Version: webpack 2.3.2
6161
Asset Size Chunks Chunk Names
6262
0.chunk.js 5.76 kB 0 [emitted]
63-
1.chunk.js 397 bytes 1 [emitted]
64-
pageB.bundle.js 6.17 kB 2 [emitted] pageB
65-
pageA.bundle.js 6.14 kB 3 [emitted] pageA
66-
pageC.bundle.js 5.94 kB 4 [emitted] pageC
63+
1.chunk.js 401 bytes 1 [emitted]
64+
pageB.bundle.js 6.41 kB 2 [emitted] pageB
65+
pageA.bundle.js 6.38 kB 3 [emitted] pageA
66+
pageC.bundle.js 6.17 kB 4 [emitted] pageC
6767
Entrypoint pageA = pageA.bundle.js
6868
Entrypoint pageB = pageB.bundle.js
6969
Entrypoint pageC = pageC.bundle.js
@@ -101,8 +101,8 @@ chunk {4} pageC.bundle.js (pageC) 70 bytes [entry] [rendered]
101101
## Minimized (uglify-js, no zip)
102102

103103
```
104-
Hash: 06f18f1663d1b6555aff
105-
Version: webpack 2.2.0-rc.2
104+
Hash: 75bcce350a8b5f748873
105+
Version: webpack 2.3.2
106106
Asset Size Chunks Chunk Names
107107
0.chunk.js 75 bytes 0 [emitted]
108108
1.chunk.js 78 bytes 1 [emitted]

‎examples/build-common.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var displayReasons = global.NO_REASONS ? "" : " --display-reasons --display-used
1717
if (error !== null && remainingTimes === 1)
1818
console.log(error);
1919
try {
20-
var readme = tc(fs.readFileSync(require("path").join(process.cwd(), "template.md"), "utf-8"), process.cwd(), stdout.replace(/[\r\n]*$/, ""), "min");
20+
var readme = tc.replaceResults(fs.readFileSync(require("path").join(process.cwd(), "template.md"), "utf-8"), process.cwd(), stdout.replace(/[\r\n]*$/, ""), "min");
2121
} catch(e) {
2222
console.log(stderr);
2323
throw e;
@@ -29,8 +29,8 @@ var displayReasons = global.NO_REASONS ? "" : " --display-reasons --display-used
2929
console.log(stderr);
3030
if (error !== null && remainingTimes === 1)
3131
console.log(error);
32-
readme = tc(readme, process.cwd(), stdout.replace(/[\r\n]*$/, ""));
33-
readme = readme.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
32+
readme = tc.replaceResults(readme, process.cwd(), stdout.replace(/[\r\n]*$/, ""));
33+
readme = tc.replaceBase(readme);
3434
fs.writeFile("README.md", readme, "utf-8", function() {});
3535
if(remainingTimes > 1)
3636
doIt(remainingTimes - 1);

‎examples/chunkhash/README.md‎

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module.exports = {
3636
},
3737
output: {
3838
path: path.join(__dirname, "js"),
39-
filename: "[name].chunkhash.js",
39+
filename: "[name].[chunkhash].js",
4040
chunkFilename: "[chunkhash].js"
4141
},
4242
plugins: [
@@ -62,7 +62,7 @@ module.exports = {
6262

6363
<!-- inlined minimized file "manifest.[chunkhash].js" -->
6464
<script>
65-
!function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(t,c,a){for(var u,i,f,s=0,d=[];s<t.length;s++)i=t[s],o[i]&&d.push(o[i][0]),o[i]=0;for(u in c)Object.prototype.hasOwnProperty.call(c,u)&&(e[u]=c[u]);for(n&&n(t,c,a);d.length;)d.shift()();if(a)for(s=0;s<a.length;s++)f=r(r.s=a[s]);return f};var t={},o={4:0};r.e=function(e){function n(){c.onerror=c.onload=null,clearTimeout(a);var r=o[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}if(0===o[e])return Promise.resolve();if(o[e])return o[e][2];var t=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,r.nc&&c.setAttribute("nonce",r.nc),c.src=r.p+""+{0:"ecd2b16a48d8b92daf31",1:"3ab6307df46b05a2e3c3",2:"0910ffec005965d55bfb",3:"7e3d3299e6c5c1defd1d"}[e]+".js";var a=setTimeout(n,12e4);c.onerror=c.onload=n;var u=new Promise(function(r,n){o[e]=[r,n]});return o[e][2]=u,t.appendChild(c),u},r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="js/",r.oe=function(e){throw console.error(e),e}}([]);
65+
!function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(t,c,u){for(var a,i,f,s=0,l=[];s<t.length;s++)i=t[s],o[i]&&l.push(o[i][0]),o[i]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(n&&n(t,c,u);l.length;)l.shift()();if(u)for(s=0;s<u.length;s++)f=r(r.s=u[s]);return f};var t={},o={4:0};r.e=function(e){function n(){u.onerror=u.onload=null,clearTimeout(a);var r=o[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}if(0===o[e])return Promise.resolve();if(o[e])return o[e][2];var t=new Promise(function(r,n){o[e]=[r,n]});o[e][2]=t;var c=document.getElementsByTagName("head")[0],u=document.createElement("script");u.type="text/javascript",u.charset="utf-8",u.async=!0,u.timeout=12e4,r.nc&&u.setAttribute("nonce",r.nc),u.src=r.p+""+{0:"d1359b519c10df30787b",1:"06459c375ec851b0e2ae",2:"4d752abc2fcf569f13fc",3:"8d8564a703e7631bff4b"}[e]+".js";var a=setTimeout(n,12e4);return u.onerror=u.onload=n,c.appendChild(u),t},r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="js/",r.oe=function(e){throw console.error(e),e}}([]);
6666
</script>
6767

6868
<!-- optional when using the CommonChunkPlugin for vendor modules -->
@@ -77,7 +77,7 @@ module.exports = {
7777
# js/common.[chunkhash].js
7878

7979
``` javascript
80-
webpackJsonp([2,4],[
80+
webpackJsonp([2],[
8181
/* 0 */
8282
/* exports provided: default */
8383
/* all exports used */
@@ -114,7 +114,7 @@ module.exports = __webpack_require__(/*! ./vendor */0);
114114
# js/main.[chunkhash].js
115115

116116
``` javascript
117-
webpackJsonp([3,4],{
117+
webpackJsonp([3],{
118118

119119
/***/ 3:
120120
/* unknown exports provided */
@@ -143,67 +143,67 @@ __webpack_require__.e/* import() */(0).then(__webpack_require__.bind(null, /*! .
143143
## Uncompressed
144144

145145
```
146-
Hash: 4e82450959815ca9c86c
147-
Version: webpack 2.2.1
146+
Hash: ea635224271deb1b32d9
147+
Version: webpack 2.3.3
148148
Asset Size Chunks Chunk Names
149-
ecd2b16a48d8b92daf31.js 238 bytes 0, 4 [emitted]
150-
3ab6307df46b05a2e3c3.js 244 bytes 1, 4 [emitted]
151-
common.chunkhash.js 747 bytes 2, 4 [emitted] common
152-
main.chunkhash.js 652 bytes 3, 4 [emitted] main
153-
manifest.chunkhash.js 5.66 kB 4 [emitted] manifest
154-
Entrypoint main = manifest.chunkhash.js common.chunkhash.js main.chunkhash.js
155-
Entrypoint common = manifest.chunkhash.js common.chunkhash.js
156-
chunk {0} ecd2b16a48d8b92daf31.js 28 bytes {3} [rendered]
149+
d1359b519c10df30787b.js 237 bytes 0 [emitted]
150+
06459c375ec851b0e2ae.js 243 bytes 1 [emitted]
151+
common.[chunkhash].js 747 bytes 2 [emitted] common
152+
main.[chunkhash].js 654 bytes 3 [emitted] main
153+
manifest.[chunkhash].js 5.88 kB 4 [emitted] manifest
154+
Entrypoint main = manifest.[chunkhash].js common.[chunkhash].js main.[chunkhash].js
155+
Entrypoint common = manifest.[chunkhash].js common.[chunkhash].js
156+
chunk {0} d1359b519c10df30787b.js 29 bytes {3} [rendered]
157157
> [3] ./example.js 4:0-18
158-
[2] ./async2.js 28 bytes {0} [built]
158+
[2] ./async2.js 29 bytes {0} [built]
159159
import() ./async2 [3] ./example.js 4:0-18
160-
chunk {1} 3ab6307df46b05a2e3c3.js 28 bytes {3} [rendered]
160+
chunk {1} 06459c375ec851b0e2ae.js 29 bytes {3} [rendered]
161161
> [3] ./example.js 3:0-18
162-
[1] ./async1.js 28 bytes {1} [built]
162+
[1] ./async1.js 29 bytes {1} [built]
163163
import() ./async1 [3] ./example.js 3:0-18
164-
chunk {2} common.chunkhash.js (common) 95 bytes {4} [initial] [rendered]
164+
chunk {2} common.[chunkhash].js (common) 97 bytes {4} [initial] [rendered]
165165
> common [4] multi ./vendor
166-
[0] ./vendor.js 67 bytes {2} [built]
166+
[0] ./vendor.js 69 bytes {2} [built]
167167
[exports: default]
168168
harmony import ./vendor [3] ./example.js 1:0-30
169169
single entry ./vendor [4] multi ./vendor common:100000
170170
[4] multi ./vendor 28 bytes {2} [built]
171-
chunk {3} main.chunkhash.js (main) 86 bytes {2} [initial] [rendered]
171+
chunk {3} main.[chunkhash].js (main) 90 bytes {2} [initial] [rendered]
172172
> main [3] ./example.js
173-
[3] ./example.js 86 bytes {3} [built]
174-
chunk {4} manifest.chunkhash.js (manifest) 0 bytes [entry] [rendered]
173+
[3] ./example.js 90 bytes {3} [built]
174+
chunk {4} manifest.[chunkhash].js (manifest) 0 bytes [entry] [rendered]
175175
```
176176

177177
## Minimized (uglify-js, no zip)
178178

179179
```
180-
Hash: 4e82450959815ca9c86c
181-
Version: webpack 2.2.1
180+
Hash: ea635224271deb1b32d9
181+
Version: webpack 2.3.3
182182
Asset Size Chunks Chunk Names
183-
ecd2b16a48d8b92daf31.js 40 bytes 0, 4 [emitted]
184-
3ab6307df46b05a2e3c3.js 39 bytes 1, 4 [emitted]
185-
common.chunkhash.js 154 bytes 2, 4 [emitted] common
186-
main.chunkhash.js 168 bytes 3, 4 [emitted] main
187-
manifest.chunkhash.js 1.48 kB 4 [emitted] manifest
188-
Entrypoint main = manifest.chunkhash.js common.chunkhash.js main.chunkhash.js
189-
Entrypoint common = manifest.chunkhash.js common.chunkhash.js
190-
chunk {0} ecd2b16a48d8b92daf31.js 28 bytes {3} [rendered]
183+
d1359b519c10df30787b.js 38 bytes 0 [emitted]
184+
06459c375ec851b0e2ae.js 37 bytes 1 [emitted]
185+
common.[chunkhash].js 152 bytes 2 [emitted] common
186+
main.[chunkhash].js 166 bytes 3 [emitted] main
187+
manifest.[chunkhash].js 1.48 kB 4 [emitted] manifest
188+
Entrypoint main = manifest.[chunkhash].js common.[chunkhash].js main.[chunkhash].js
189+
Entrypoint common = manifest.[chunkhash].js common.[chunkhash].js
190+
chunk {0} d1359b519c10df30787b.js 29 bytes {3} [rendered]
191191
> [3] ./example.js 4:0-18
192-
[2] ./async2.js 28 bytes {0} [built]
192+
[2] ./async2.js 29 bytes {0} [built]
193193
import() ./async2 [3] ./example.js 4:0-18
194-
chunk {1} 3ab6307df46b05a2e3c3.js 28 bytes {3} [rendered]
194+
chunk {1} 06459c375ec851b0e2ae.js 29 bytes {3} [rendered]
195195
> [3] ./example.js 3:0-18
196-
[1] ./async1.js 28 bytes {1} [built]
196+
[1] ./async1.js 29 bytes {1} [built]
197197
import() ./async1 [3] ./example.js 3:0-18
198-
chunk {2} common.chunkhash.js (common) 95 bytes {4} [initial] [rendered]
198+
chunk {2} common.[chunkhash].js (common) 97 bytes {4} [initial] [rendered]
199199
> common [4] multi ./vendor
200-
[0] ./vendor.js 67 bytes {2} [built]
200+
[0] ./vendor.js 69 bytes {2} [built]
201201
[exports: default]
202202
harmony import ./vendor [3] ./example.js 1:0-30
203203
single entry ./vendor [4] multi ./vendor common:100000
204204
[4] multi ./vendor 28 bytes {2} [built]
205-
chunk {3} main.chunkhash.js (main) 86 bytes {2} [initial] [rendered]
205+
chunk {3} main.[chunkhash].js (main) 90 bytes {2} [initial] [rendered]
206206
> main [3] ./example.js
207-
[3] ./example.js 86 bytes {3} [built]
208-
chunk {4} manifest.chunkhash.js (manifest) 0 bytes [entry] [rendered]
207+
[3] ./example.js 90 bytes {3} [built]
208+
chunk {4} manifest.[chunkhash].js (manifest) 0 bytes [entry] [rendered]
209209
```

0 commit comments

Comments
 (0)