Skip to content

Commit 8ca07fd

Browse files
committed
updated harmony examples
1 parent d71d58a commit 8ca07fd

File tree

2 files changed

+14
-17
lines changed

2 files changed

+14
-17
lines changed

examples/harmony-unused/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ export { add as reexportedAdd, multiply as reexportedMultiply } from "./math";
156156

157157

158158

159-
/* harmony import */ __WEBPACK_IMPORTED_MODULE_0__math__["a"](1, 2);
160-
/* harmony import */ __WEBPACK_IMPORTED_MODULE_1__library__["a"](1, 2);
159+
/* harmony import */__WEBPACK_IMPORTED_MODULE_0__math__["a"].bind()(1, 2);
160+
/* harmony import */__WEBPACK_IMPORTED_MODULE_1__library__["a"].bind()(1, 2);
161161

162162

163163
/***/ }
@@ -167,7 +167,7 @@ export { add as reexportedAdd, multiply as reexportedMultiply } from "./math";
167167
# js/output.js
168168

169169
``` javascript
170-
!function(n){function r(e){if(t[e])return t[e].exports;var o=t[e]={exports:{},id:e,loaded:!1};return n[e].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var t={};return r.m=n,r.c=t,r.p="js/",r(r.s=3)}([function(n,r,t){function e(){for(var n=0,r=0,t=arguments,e=t.length;e>r;)n+=t[r++];return n}function o(){for(var n=1,r=0,t=arguments,e=t.length;e>r;)n*=t[r++];return n}r.a=e,r.b=o},function(n,r,t){var e=(t(2),t(0));Object.defineProperty(r,"a",{configurable:!1,enumerable:!0,get:function(){return e.b}})},function(n,r,t){},function(n,r,t){var e=t(0),o=t(1);e.a(1,2),o.a(1,2)}]);
170+
!function(n){function r(e){if(t[e])return t[e].exports;var o=t[e]={exports:{},id:e,loaded:!1};return n[e].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var t={};return r.m=n,r.c=t,r.p="js/",r(r.s=3)}([function(n,r,t){function e(){for(var n=0,r=0,t=arguments,e=t.length;e>r;)n+=t[r++];return n}function o(){for(var n=1,r=0,t=arguments,e=t.length;e>r;)n*=t[r++];return n}r.a=e,r.b=o},function(n,r,t){var e=(t(2),t(0));Object.defineProperty(r,"a",{configurable:!1,enumerable:!0,get:function(){return e.b}})},function(n,r,t){},function(n,r,t){var e=t(0),o=t(1);e.a.bind()(1,2),o.a.bind()(1,2)}]);
171171
```
172172
173173
# Info
@@ -176,10 +176,10 @@ export { add as reexportedAdd, multiply as reexportedMultiply } from "./math";
176176
177177
```
178178
Hash: e3cda11c1e9e036a0c7b
179-
Version: webpack 2.0.6-beta
179+
Version: webpack 2.0.7-beta
180180
Time: 91ms
181-
Asset Size Chunks Chunk Names
182-
output.js 3.5 kB 0 [emitted] main
181+
Asset Size Chunks Chunk Names
182+
output.js 3.51 kB 0 [emitted] main
183183
chunk {0} output.js (main) 728 bytes [rendered]
184184
> main [3] ./example.js
185185
[0] ./math.js 366 bytes {0} [built]
@@ -196,10 +196,10 @@ chunk {0} output.js (main) 728 bytes [rendered]
196196
197197
```
198198
Hash: e3cda11c1e9e036a0c7b
199-
Version: webpack 2.0.6-beta
199+
Version: webpack 2.0.7-beta
200200
Time: 188ms
201201
Asset Size Chunks Chunk Names
202-
output.js 584 bytes 0 [emitted] main
202+
output.js 598 bytes 0 [emitted] main
203203
chunk {0} output.js (main) 728 bytes [rendered]
204204
> main [3] ./example.js
205205
[0] ./math.js 366 bytes {0} [built]

examples/harmony/README.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,6 @@ export function increment(val) {
126126
/******/ // __webpack_public_path__
127127
/******/ __webpack_require__.p = "js/";
128128

129-
/******/ // on error function for async loading
130-
/******/ __webpack_require__.oe = function(err) { throw err; };
131-
132129
/******/ // Load entry module and return exports
133130
/******/ return __webpack_require__(__webpack_require__.s = 2);
134131
/******/ })
@@ -143,7 +140,7 @@ export function increment(val) {
143140
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math__ = __webpack_require__(/*! ./math */ 3);
144141
/* harmony export */ exports["a"] = increment;
145142
function increment(val) {
146-
return /* harmony import */ __WEBPACK_IMPORTED_MODULE_0__math__["a"](val, 1);
143+
return /* harmony import */__WEBPACK_IMPORTED_MODULE_0__math__["a"].bind()(val, 1);
147144
};
148145

149146

@@ -158,7 +155,7 @@ export function increment(val) {
158155
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__increment__ = __webpack_require__(/*! ./increment */ 0);
159156

160157
var a = 1;
161-
/* harmony import */ __WEBPACK_IMPORTED_MODULE_0__increment__["a"](a); // 2
158+
/* harmony import */__WEBPACK_IMPORTED_MODULE_0__increment__["a"].bind()(a); // 2
162159

163160
// async loading
164161
__webpack_require__.e/* System.import */(1).then(__webpack_require__.bind(null, /*! ./async-loaded */ 1)).then(function(asyncLoaded) {
@@ -192,10 +189,10 @@ export function increment(val) {
192189

193190
```
194191
Hash: 03492ef5e250ea40b1d4
195-
Version: webpack 2.0.6-beta
192+
Version: webpack 2.0.7-beta
196193
Time: 115ms
197194
Asset Size Chunks Chunk Names
198-
output.js 5.38 kB 0 [emitted] main
195+
output.js 5.28 kB 0 [emitted] main
199196
1.js 355 bytes 1 [emitted]
200197
chunk {0} output.js (main) 426 bytes [rendered]
201198
> main [2] ./example.js
@@ -214,10 +211,10 @@ chunk {1} 1.js 25 bytes {0} [rendered]
214211

215212
```
216213
Hash: 03492ef5e250ea40b1d4
217-
Version: webpack 2.0.6-beta
214+
Version: webpack 2.0.7-beta
218215
Time: 210ms
219216
Asset Size Chunks Chunk Names
220-
output.js 1.21 kB 0 [emitted] main
217+
output.js 1.2 kB 0 [emitted] main
221218
1.js 138 bytes 1 [emitted]
222219
chunk {0} output.js (main) 426 bytes [rendered]
223220
> main [2] ./example.js

0 commit comments

Comments
 (0)