Skip to content

Commit 36cf39e

Browse files
huixishenghuixisheng
huixisheng
authored and
huixisheng
committedJan 25, 2018
feat: update demo11
1 parent a3bd929 commit 36cf39e

File tree

3 files changed

+201
-0
lines changed

3 files changed

+201
-0
lines changed
 

‎demo11/0.bundle.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
webpackJsonp([0],{
2+
3+
/***/ 2:
4+
/***/ (function(module, exports) {
5+
6+
module.exports = 'Hello World';
7+
8+
9+
/***/ })
10+
11+
});

‎demo11/bundle.js

+181
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
/******/ (function(modules) { // webpackBootstrap
2+
/******/ // install a JSONP callback for chunk loading
3+
/******/ var parentJsonpFunction = window["webpackJsonp"];
4+
/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {
5+
/******/ // add "moreModules" to the modules object,
6+
/******/ // then flag all "chunkIds" as loaded and fire callback
7+
/******/ var moduleId, chunkId, i = 0, resolves = [], result;
8+
/******/ for(;i < chunkIds.length; i++) {
9+
/******/ chunkId = chunkIds[i];
10+
/******/ if(installedChunks[chunkId]) {
11+
/******/ resolves.push(installedChunks[chunkId][0]);
12+
/******/ }
13+
/******/ installedChunks[chunkId] = 0;
14+
/******/ }
15+
/******/ for(moduleId in moreModules) {
16+
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
17+
/******/ modules[moduleId] = moreModules[moduleId];
18+
/******/ }
19+
/******/ }
20+
/******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);
21+
/******/ while(resolves.length) {
22+
/******/ resolves.shift()();
23+
/******/ }
24+
/******/
25+
/******/ };
26+
/******/
27+
/******/ // The module cache
28+
/******/ var installedModules = {};
29+
/******/
30+
/******/ // objects to store loaded and loading chunks
31+
/******/ var installedChunks = {
32+
/******/ 1: 0
33+
/******/ };
34+
/******/
35+
/******/ // The require function
36+
/******/ function __webpack_require__(moduleId) {
37+
/******/
38+
/******/ // Check if module is in cache
39+
/******/ if(installedModules[moduleId]) {
40+
/******/ return installedModules[moduleId].exports;
41+
/******/ }
42+
/******/ // Create a new module (and put it into the cache)
43+
/******/ var module = installedModules[moduleId] = {
44+
/******/ i: moduleId,
45+
/******/ l: false,
46+
/******/ exports: {}
47+
/******/ };
48+
/******/
49+
/******/ // Execute the module function
50+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
51+
/******/
52+
/******/ // Flag the module as loaded
53+
/******/ module.l = true;
54+
/******/
55+
/******/ // Return the exports of the module
56+
/******/ return module.exports;
57+
/******/ }
58+
/******/
59+
/******/ // This file contains only the entry chunk.
60+
/******/ // The chunk loading function for additional chunks
61+
/******/ __webpack_require__.e = function requireEnsure(chunkId) {
62+
/******/ var installedChunkData = installedChunks[chunkId];
63+
/******/ if(installedChunkData === 0) {
64+
/******/ return new Promise(function(resolve) { resolve(); });
65+
/******/ }
66+
/******/
67+
/******/ // a Promise means "currently loading".
68+
/******/ if(installedChunkData) {
69+
/******/ return installedChunkData[2];
70+
/******/ }
71+
/******/
72+
/******/ // setup Promise in chunk cache
73+
/******/ var promise = new Promise(function(resolve, reject) {
74+
/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
75+
/******/ });
76+
/******/ installedChunkData[2] = promise;
77+
/******/
78+
/******/ // start chunk loading
79+
/******/ var head = document.getElementsByTagName('head')[0];
80+
/******/ var script = document.createElement('script');
81+
/******/ script.type = 'text/javascript';
82+
/******/ script.charset = 'utf-8';
83+
/******/ script.async = true;
84+
/******/ script.timeout = 120000;
85+
/******/
86+
/******/ if (__webpack_require__.nc) {
87+
/******/ script.setAttribute("nonce", __webpack_require__.nc);
88+
/******/ }
89+
/******/ script.src = __webpack_require__.p + "" + chunkId + ".bundle.js";
90+
/******/ var timeout = setTimeout(onScriptComplete, 120000);
91+
/******/ script.onerror = script.onload = onScriptComplete;
92+
/******/ function onScriptComplete() {
93+
/******/ // avoid mem leaks in IE.
94+
/******/ script.onerror = script.onload = null;
95+
/******/ clearTimeout(timeout);
96+
/******/ var chunk = installedChunks[chunkId];
97+
/******/ if(chunk !== 0) {
98+
/******/ if(chunk) {
99+
/******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));
100+
/******/ }
101+
/******/ installedChunks[chunkId] = undefined;
102+
/******/ }
103+
/******/ };
104+
/******/ head.appendChild(script);
105+
/******/
106+
/******/ return promise;
107+
/******/ };
108+
/******/
109+
/******/ // expose the modules object (__webpack_modules__)
110+
/******/ __webpack_require__.m = modules;
111+
/******/
112+
/******/ // expose the module cache
113+
/******/ __webpack_require__.c = installedModules;
114+
/******/
115+
/******/ // define getter function for harmony exports
116+
/******/ __webpack_require__.d = function(exports, name, getter) {
117+
/******/ if(!__webpack_require__.o(exports, name)) {
118+
/******/ Object.defineProperty(exports, name, {
119+
/******/ configurable: false,
120+
/******/ enumerable: true,
121+
/******/ get: getter
122+
/******/ });
123+
/******/ }
124+
/******/ };
125+
/******/
126+
/******/ // getDefaultExport function for compatibility with non-harmony modules
127+
/******/ __webpack_require__.n = function(module) {
128+
/******/ var getter = module && module.__esModule ?
129+
/******/ function getDefault() { return module['default']; } :
130+
/******/ function getModuleExports() { return module; };
131+
/******/ __webpack_require__.d(getter, 'a', getter);
132+
/******/ return getter;
133+
/******/ };
134+
/******/
135+
/******/ // Object.prototype.hasOwnProperty.call
136+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
137+
/******/
138+
/******/ // __webpack_public_path__
139+
/******/ __webpack_require__.p = "";
140+
/******/
141+
/******/ // on error function for async loading
142+
/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
143+
/******/
144+
/******/ // Load entry module and return exports
145+
/******/ return __webpack_require__(__webpack_require__.s = 0);
146+
/******/ })
147+
/************************************************************************/
148+
/******/ ([
149+
/* 0 */
150+
/***/ (function(module, exports, __webpack_require__) {
151+
152+
var load = __webpack_require__(1);
153+
154+
load(function(file) {
155+
document.open();
156+
document.write('<h1>' + file + '</h1>');
157+
document.close();
158+
});
159+
160+
161+
/***/ }),
162+
/* 1 */
163+
/***/ (function(module, exports, __webpack_require__) {
164+
165+
var cbs = [],
166+
data;
167+
module.exports = function(cb) {
168+
if(cbs) cbs.push(cb);
169+
else cb(data);
170+
}
171+
__webpack_require__.e/* require.ensure */(0).then((function(require) {
172+
data = __webpack_require__(2);
173+
var callbacks = cbs;
174+
cbs = null;
175+
for(var i = 0, l = callbacks.length; i < l; i++) {
176+
callbacks[i](data);
177+
}
178+
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
179+
180+
/***/ })
181+
/******/ ]);

‎demo11/package.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "webpack-demo11",
3+
"version": "1.0.0",
4+
"scripts": {
5+
"dev": "webpack-dev-server --open",
6+
"build": "webpack"
7+
},
8+
"license": "MIT"
9+
}

0 commit comments

Comments
 (0)
Please sign in to comment.