2017-10-11 23:30:54 +02:00
|
|
|
# example.js
|
|
|
|
|
2019-04-08 20:29:40 +02:00
|
|
|
This example illustrates how to filter the ContextModule results of `import()` statements. only `.js` files that don't
|
2017-10-12 23:41:43 +02:00
|
|
|
end in `.noimport.js` within the `templates` folder will be bundled.
|
2017-10-11 23:30:54 +02:00
|
|
|
|
2019-04-08 20:29:40 +02:00
|
|
|
```javascript
|
2017-10-11 23:30:54 +02:00
|
|
|
async function getTemplate(templateName) {
|
|
|
|
try {
|
|
|
|
let template = await import(
|
2017-11-23 09:47:19 +01:00
|
|
|
/* webpackInclude: /\.js$/ */
|
|
|
|
/* webpackExclude: /\.noimport\.js$/ */
|
2017-10-11 23:30:54 +02:00
|
|
|
`./templates/${templateName}`
|
|
|
|
);
|
|
|
|
console.log(template);
|
|
|
|
} catch(err) {
|
|
|
|
console.error(err);
|
|
|
|
return new Error(err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
getTemplate("foo");
|
|
|
|
getTemplate("bar");
|
|
|
|
getTemplate("baz");
|
|
|
|
getTemplate("foo.noimport");
|
|
|
|
getTemplate("bar.noimport");
|
|
|
|
getTemplate("baz.noimport");
|
|
|
|
```
|
|
|
|
|
|
|
|
# templates/
|
|
|
|
|
2019-04-08 20:29:40 +02:00
|
|
|
- foo.js
|
|
|
|
- foo.noimport.js
|
|
|
|
- baz.js
|
|
|
|
- foo.noimport.js
|
|
|
|
- bar.js
|
|
|
|
- foo.noimport.js
|
2017-10-11 23:30:54 +02:00
|
|
|
|
|
|
|
All templates are of this pattern:
|
|
|
|
|
2019-04-08 20:29:40 +02:00
|
|
|
```javascript
|
2017-10-11 23:30:54 +02:00
|
|
|
var foo = "foo";
|
|
|
|
|
|
|
|
export default foo;
|
|
|
|
```
|
|
|
|
|
2018-01-04 21:39:29 +01:00
|
|
|
# dist/output.js
|
2017-10-11 23:30:54 +02:00
|
|
|
|
|
|
|
<details><summary><code>/******/ (function(modules) { /* webpackBootstrap */ })</code></summary>
|
|
|
|
|
2019-04-08 20:29:40 +02:00
|
|
|
```javascript
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
|
|
/******/ // install a JSONP callback for chunk loading
|
2017-11-23 09:47:19 +01:00
|
|
|
/******/ function webpackJsonpCallback(data) {
|
2018-01-19 17:06:59 +01:00
|
|
|
/******/ var chunkIds = data[0];
|
2018-04-04 15:17:13 +02:00
|
|
|
/******/ var moreModules = data[1];
|
2018-01-19 17:06:59 +01:00
|
|
|
/******/
|
2018-09-25 17:08:35 +02:00
|
|
|
/******/
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/ // add "moreModules" to the modules object,
|
|
|
|
/******/ // then flag all "chunkIds" as loaded and fire callback
|
2018-01-19 17:06:59 +01:00
|
|
|
/******/ var moduleId, chunkId, i = 0, resolves = [];
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/ for(;i < chunkIds.length; i++) {
|
|
|
|
/******/ chunkId = chunkIds[i];
|
|
|
|
/******/ if(installedChunks[chunkId]) {
|
|
|
|
/******/ resolves.push(installedChunks[chunkId][0]);
|
|
|
|
/******/ }
|
|
|
|
/******/ installedChunks[chunkId] = 0;
|
|
|
|
/******/ }
|
|
|
|
/******/ for(moduleId in moreModules) {
|
|
|
|
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
|
|
|
|
/******/ modules[moduleId] = moreModules[moduleId];
|
|
|
|
/******/ }
|
|
|
|
/******/ }
|
2017-11-23 09:47:19 +01:00
|
|
|
/******/ if(parentJsonpFunction) parentJsonpFunction(data);
|
2018-09-25 17:08:35 +02:00
|
|
|
/******/
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/ while(resolves.length) {
|
|
|
|
/******/ resolves.shift()();
|
|
|
|
/******/ }
|
|
|
|
/******/
|
|
|
|
/******/ };
|
|
|
|
/******/
|
2018-01-19 17:06:59 +01:00
|
|
|
/******/
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/ // The module cache
|
|
|
|
/******/ var installedModules = {};
|
|
|
|
/******/
|
2017-11-23 09:47:19 +01:00
|
|
|
/******/ // object to store loaded and loading chunks
|
2018-05-07 12:36:38 +02:00
|
|
|
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
|
|
|
/******/ // Promise = chunk loading, 0 = chunk loaded
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/ var installedChunks = {
|
|
|
|
/******/ 3: 0
|
|
|
|
/******/ };
|
|
|
|
/******/
|
2018-01-19 17:06:59 +01:00
|
|
|
/******/
|
2017-11-23 09:47:19 +01:00
|
|
|
/******/
|
2018-05-07 12:36:38 +02:00
|
|
|
/******/ // script path function
|
|
|
|
/******/ function jsonpScriptSrc(chunkId) {
|
|
|
|
/******/ return __webpack_require__.p + "" + chunkId + ".output.js"
|
|
|
|
/******/ }
|
|
|
|
/******/
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/ // The require function
|
|
|
|
/******/ function __webpack_require__(moduleId) {
|
|
|
|
/******/
|
|
|
|
/******/ // Check if module is in cache
|
|
|
|
/******/ if(installedModules[moduleId]) {
|
|
|
|
/******/ return installedModules[moduleId].exports;
|
|
|
|
/******/ }
|
|
|
|
/******/ // Create a new module (and put it into the cache)
|
|
|
|
/******/ var module = installedModules[moduleId] = {
|
|
|
|
/******/ i: moduleId,
|
|
|
|
/******/ l: false,
|
|
|
|
/******/ exports: {}
|
|
|
|
/******/ };
|
|
|
|
/******/
|
|
|
|
/******/ // Execute the module function
|
|
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
|
|
/******/
|
|
|
|
/******/ // Flag the module as loaded
|
|
|
|
/******/ module.l = true;
|
|
|
|
/******/
|
|
|
|
/******/ // Return the exports of the module
|
|
|
|
/******/ return module.exports;
|
|
|
|
/******/ }
|
|
|
|
/******/
|
|
|
|
/******/ // This file contains only the entry chunk.
|
|
|
|
/******/ // The chunk loading function for additional chunks
|
|
|
|
/******/ __webpack_require__.e = function requireEnsure(chunkId) {
|
2017-11-23 09:47:19 +01:00
|
|
|
/******/ var promises = [];
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/
|
|
|
|
/******/
|
2017-11-23 09:47:19 +01:00
|
|
|
/******/ // JSONP chunk loading for javascript
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/
|
2017-11-23 09:47:19 +01:00
|
|
|
/******/ var installedChunkData = installedChunks[chunkId];
|
|
|
|
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/
|
2017-11-23 09:47:19 +01:00
|
|
|
/******/ // a Promise means "currently loading".
|
|
|
|
/******/ if(installedChunkData) {
|
|
|
|
/******/ promises.push(installedChunkData[2]);
|
|
|
|
/******/ } else {
|
|
|
|
/******/ // setup Promise in chunk cache
|
|
|
|
/******/ var promise = new Promise(function(resolve, reject) {
|
|
|
|
/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
|
|
|
|
/******/ });
|
|
|
|
/******/ promises.push(installedChunkData[2] = promise);
|
|
|
|
/******/
|
|
|
|
/******/ // start chunk loading
|
|
|
|
/******/ var script = document.createElement('script');
|
2018-09-25 17:08:35 +02:00
|
|
|
/******/ var onScriptComplete;
|
2018-01-04 21:14:02 +01:00
|
|
|
/******/
|
2017-11-23 09:47:19 +01:00
|
|
|
/******/ script.charset = 'utf-8';
|
2018-04-04 15:17:13 +02:00
|
|
|
/******/ script.timeout = 120;
|
2017-11-23 09:47:19 +01:00
|
|
|
/******/ if (__webpack_require__.nc) {
|
|
|
|
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/ }
|
2018-05-07 12:36:38 +02:00
|
|
|
/******/ script.src = jsonpScriptSrc(chunkId);
|
2018-09-25 17:08:35 +02:00
|
|
|
/******/
|
|
|
|
/******/ onScriptComplete = function (event) {
|
2017-11-23 09:47:19 +01:00
|
|
|
/******/ // avoid mem leaks in IE.
|
|
|
|
/******/ script.onerror = script.onload = null;
|
|
|
|
/******/ clearTimeout(timeout);
|
|
|
|
/******/ var chunk = installedChunks[chunkId];
|
|
|
|
/******/ if(chunk !== 0) {
|
|
|
|
/******/ if(chunk) {
|
|
|
|
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
|
|
|
|
/******/ var realSrc = event && event.target && event.target.src;
|
|
|
|
/******/ var error = new Error('Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')');
|
|
|
|
/******/ error.type = errorType;
|
|
|
|
/******/ error.request = realSrc;
|
|
|
|
/******/ chunk[1](error);
|
|
|
|
/******/ }
|
|
|
|
/******/ installedChunks[chunkId] = undefined;
|
|
|
|
/******/ }
|
|
|
|
/******/ };
|
2018-09-25 17:08:35 +02:00
|
|
|
/******/ var timeout = setTimeout(function(){
|
|
|
|
/******/ onScriptComplete({ type: 'timeout', target: script });
|
|
|
|
/******/ }, 120000);
|
|
|
|
/******/ script.onerror = script.onload = onScriptComplete;
|
2018-12-19 11:36:59 +01:00
|
|
|
/******/ document.head.appendChild(script);
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/ }
|
2017-11-23 09:47:19 +01:00
|
|
|
/******/ }
|
|
|
|
/******/ return Promise.all(promises);
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/ };
|
|
|
|
/******/
|
|
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
|
|
/******/ __webpack_require__.m = modules;
|
|
|
|
/******/
|
|
|
|
/******/ // expose the module cache
|
|
|
|
/******/ __webpack_require__.c = installedModules;
|
|
|
|
/******/
|
|
|
|
/******/ // define getter function for harmony exports
|
|
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
2018-09-25 17:08:35 +02:00
|
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/ }
|
|
|
|
/******/ };
|
|
|
|
/******/
|
2017-11-24 08:40:39 +01:00
|
|
|
/******/ // define __esModule on exports
|
|
|
|
/******/ __webpack_require__.r = function(exports) {
|
2018-09-25 17:08:35 +02:00
|
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
|
/******/ }
|
2017-11-24 08:40:39 +01:00
|
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
|
/******/ };
|
|
|
|
/******/
|
2018-09-25 17:08:35 +02:00
|
|
|
/******/ // create a fake namespace object
|
|
|
|
/******/ // mode & 1: value is a module id, require it
|
|
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
|
|
/******/ // mode & 4: return value when already ns object
|
|
|
|
/******/ // mode & 8|1: behave like require
|
|
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
|
|
/******/ if(mode & 8) return value;
|
|
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
|
|
/******/ var ns = Object.create(null);
|
|
|
|
/******/ __webpack_require__.r(ns);
|
|
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
|
|
/******/ return ns;
|
|
|
|
/******/ };
|
|
|
|
/******/
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
|
|
/******/ __webpack_require__.n = function(module) {
|
|
|
|
/******/ var getter = module && module.__esModule ?
|
|
|
|
/******/ function getDefault() { return module['default']; } :
|
|
|
|
/******/ function getModuleExports() { return module; };
|
|
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
|
|
/******/ return getter;
|
|
|
|
/******/ };
|
|
|
|
/******/
|
|
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
|
|
/******/
|
|
|
|
/******/ // __webpack_public_path__
|
2018-01-04 21:39:29 +01:00
|
|
|
/******/ __webpack_require__.p = "dist/";
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/
|
|
|
|
/******/ // on error function for async loading
|
|
|
|
/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
|
|
|
|
/******/
|
2017-11-23 09:47:19 +01:00
|
|
|
/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
|
2018-01-19 17:06:59 +01:00
|
|
|
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
|
2017-11-23 09:47:19 +01:00
|
|
|
/******/ jsonpArray.push = webpackJsonpCallback;
|
|
|
|
/******/ jsonpArray = jsonpArray.slice();
|
|
|
|
/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
|
2018-01-19 17:06:59 +01:00
|
|
|
/******/ var parentJsonpFunction = oldJsonpFunction;
|
|
|
|
/******/
|
2017-11-23 09:47:19 +01:00
|
|
|
/******/
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/ // Load entry module and return exports
|
2018-09-25 17:08:35 +02:00
|
|
|
/******/ return __webpack_require__(__webpack_require__.s = 3);
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/ })
|
|
|
|
/************************************************************************/
|
|
|
|
```
|
|
|
|
|
|
|
|
</details>
|
|
|
|
|
2019-04-08 20:29:40 +02:00
|
|
|
```javascript
|
2017-10-11 23:30:54 +02:00
|
|
|
/******/ ([
|
|
|
|
/* 0 */,
|
|
|
|
/* 1 */,
|
|
|
|
/* 2 */,
|
|
|
|
/* 3 */
|
2018-09-25 17:08:35 +02:00
|
|
|
/*!********************!*\
|
|
|
|
!*** ./example.js ***!
|
|
|
|
\********************/
|
|
|
|
/*! no static exports found */
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
async function getTemplate(templateName) {
|
|
|
|
try {
|
|
|
|
let template = await __webpack_require__(4)(`./${templateName}`);
|
|
|
|
console.log(template);
|
|
|
|
} catch(err) {
|
|
|
|
console.error(err);
|
|
|
|
return new Error(err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
getTemplate("foo");
|
|
|
|
getTemplate("bar");
|
|
|
|
getTemplate("baz");
|
|
|
|
getTemplate("foo.noimport");
|
|
|
|
getTemplate("bar.noimport");
|
|
|
|
getTemplate("baz.noimport");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/* 4 */
|
2017-12-04 14:35:55 +01:00
|
|
|
/*!******************************************************************************************!*\
|
|
|
|
!*** ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ***!
|
|
|
|
\******************************************************************************************/
|
2017-11-23 09:47:19 +01:00
|
|
|
/*! no static exports found */
|
2017-10-11 23:30:54 +02:00
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
var map = {
|
|
|
|
"./bar": [
|
2018-09-25 17:08:35 +02:00
|
|
|
0,
|
|
|
|
0
|
2017-10-11 23:30:54 +02:00
|
|
|
],
|
|
|
|
"./bar.js": [
|
2018-09-25 17:08:35 +02:00
|
|
|
0,
|
|
|
|
0
|
2017-10-11 23:30:54 +02:00
|
|
|
],
|
|
|
|
"./baz": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"./baz.js": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"./foo": [
|
2018-09-25 17:08:35 +02:00
|
|
|
2,
|
|
|
|
2
|
2017-10-11 23:30:54 +02:00
|
|
|
],
|
|
|
|
"./foo.js": [
|
2018-09-25 17:08:35 +02:00
|
|
|
2,
|
|
|
|
2
|
2017-10-11 23:30:54 +02:00
|
|
|
]
|
|
|
|
};
|
|
|
|
function webpackAsyncContext(req) {
|
2019-04-03 22:48:54 +02:00
|
|
|
if(!__webpack_require__.o(map, req)) {
|
2018-01-03 11:03:20 +01:00
|
|
|
return Promise.resolve().then(function() {
|
2018-05-15 08:16:39 +02:00
|
|
|
var e = new Error("Cannot find module '" + req + "'");
|
2018-01-03 11:03:20 +01:00
|
|
|
e.code = 'MODULE_NOT_FOUND';
|
|
|
|
throw e;
|
|
|
|
});
|
|
|
|
}
|
2019-04-03 22:48:54 +02:00
|
|
|
|
|
|
|
var ids = map[req], id = ids[0];
|
2017-10-11 23:30:54 +02:00
|
|
|
return __webpack_require__.e(ids[1]).then(function() {
|
2018-09-25 17:08:35 +02:00
|
|
|
return __webpack_require__(id);
|
2017-10-11 23:30:54 +02:00
|
|
|
});
|
2017-12-04 14:35:55 +01:00
|
|
|
}
|
2017-10-11 23:30:54 +02:00
|
|
|
webpackAsyncContext.keys = function webpackAsyncContextKeys() {
|
|
|
|
return Object.keys(map);
|
|
|
|
};
|
2018-09-25 17:08:35 +02:00
|
|
|
webpackAsyncContext.id = 4;
|
2017-10-11 23:30:54 +02:00
|
|
|
module.exports = webpackAsyncContext;
|
|
|
|
|
|
|
|
/***/ })
|
|
|
|
/******/ ]);
|
|
|
|
```
|
|
|
|
|
|
|
|
# Info
|
|
|
|
|
2017-12-14 10:58:03 +01:00
|
|
|
## Unoptimized
|
2017-10-11 23:30:54 +02:00
|
|
|
|
|
|
|
```
|
2017-12-14 10:58:03 +01:00
|
|
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
2019-04-03 22:48:54 +02:00
|
|
|
Version: webpack 4.29.6
|
2017-10-12 00:25:03 +02:00
|
|
|
Asset Size Chunks Chunk Names
|
2018-04-04 15:17:13 +02:00
|
|
|
0.output.js 433 bytes 0 [emitted]
|
|
|
|
1.output.js 442 bytes 1 [emitted]
|
|
|
|
2.output.js 436 bytes 2 [emitted]
|
2019-04-03 22:48:54 +02:00
|
|
|
output.js 9.45 KiB 3 [emitted] main
|
2017-10-12 00:25:03 +02:00
|
|
|
Entrypoint main = output.js
|
2018-04-04 15:17:13 +02:00
|
|
|
chunk {0} 0.output.js 38 bytes <{3}> [rendered]
|
2018-09-25 17:08:35 +02:00
|
|
|
> ./bar [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar
|
|
|
|
> ./bar.js [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js
|
|
|
|
[0] ./templates/bar.js 38 bytes {0} [optional] [built]
|
2018-05-07 12:36:38 +02:00
|
|
|
[exports: default]
|
2018-09-25 17:08:35 +02:00
|
|
|
context element ./bar [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar
|
|
|
|
context element ./bar.js [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js
|
2018-04-04 15:17:13 +02:00
|
|
|
chunk {1} 1.output.js 38 bytes <{3}> [rendered]
|
2018-09-25 17:08:35 +02:00
|
|
|
> ./baz [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz
|
|
|
|
> ./baz.js [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js
|
2018-05-07 12:36:38 +02:00
|
|
|
[1] ./templates/baz.js 38 bytes {1} [optional] [built]
|
|
|
|
[exports: default]
|
2018-09-25 17:08:35 +02:00
|
|
|
context element ./baz [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz
|
|
|
|
context element ./baz.js [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js
|
2018-04-04 15:17:13 +02:00
|
|
|
chunk {2} 2.output.js 38 bytes <{3}> [rendered]
|
2018-09-25 17:08:35 +02:00
|
|
|
> ./foo [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo
|
|
|
|
> ./foo.js [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js
|
|
|
|
[2] ./templates/foo.js 38 bytes {2} [optional] [built]
|
2018-05-07 12:36:38 +02:00
|
|
|
[exports: default]
|
2018-09-25 17:08:35 +02:00
|
|
|
context element ./foo [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo
|
|
|
|
context element ./foo.js [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js
|
2018-04-04 15:17:13 +02:00
|
|
|
chunk {3} output.js (main) 597 bytes >{0}< >{1}< >{2}< [entry] [rendered]
|
2019-01-25 13:15:22 +01:00
|
|
|
> ./example.js main
|
2018-09-25 17:08:35 +02:00
|
|
|
[3] ./example.js 437 bytes {3} [built]
|
2019-01-25 13:15:22 +01:00
|
|
|
single entry ./example.js main
|
2018-09-25 17:08:35 +02:00
|
|
|
[4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object 160 bytes {3} [optional] [built]
|
|
|
|
import() context lazy ./templates [3] ./example.js 3:23-7:3
|
2017-10-11 23:30:54 +02:00
|
|
|
```
|
|
|
|
|
2017-12-14 10:58:03 +01:00
|
|
|
## Production mode
|
2017-10-11 23:30:54 +02:00
|
|
|
|
|
|
|
```
|
2017-12-14 10:58:03 +01:00
|
|
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
2019-04-03 22:48:54 +02:00
|
|
|
Version: webpack 4.29.6
|
2017-12-14 10:58:03 +01:00
|
|
|
Asset Size Chunks Chunk Names
|
2017-12-21 11:19:53 +01:00
|
|
|
0.output.js 113 bytes 0 [emitted]
|
2017-12-14 10:58:03 +01:00
|
|
|
1.output.js 114 bytes 1 [emitted]
|
2017-12-21 11:19:53 +01:00
|
|
|
2.output.js 115 bytes 2 [emitted]
|
2019-04-03 22:48:54 +02:00
|
|
|
output.js 2.52 KiB 3 [emitted] main
|
2017-11-23 09:47:19 +01:00
|
|
|
Entrypoint main = output.js
|
2018-04-04 15:17:13 +02:00
|
|
|
chunk {0} 0.output.js 38 bytes <{3}> [rendered]
|
2018-09-25 17:08:35 +02:00
|
|
|
> ./bar [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar
|
|
|
|
> ./bar.js [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js
|
|
|
|
[0] ./templates/bar.js 38 bytes {0} [optional] [built]
|
2018-05-07 12:36:38 +02:00
|
|
|
[exports: default]
|
2018-09-25 17:08:35 +02:00
|
|
|
context element ./bar [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar
|
|
|
|
context element ./bar.js [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js
|
2018-04-04 15:17:13 +02:00
|
|
|
chunk {1} 1.output.js 38 bytes <{3}> [rendered]
|
2018-09-25 17:08:35 +02:00
|
|
|
> ./baz [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz
|
|
|
|
> ./baz.js [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js
|
2018-05-07 12:36:38 +02:00
|
|
|
[1] ./templates/baz.js 38 bytes {1} [optional] [built]
|
|
|
|
[exports: default]
|
2018-09-25 17:08:35 +02:00
|
|
|
context element ./baz [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz
|
|
|
|
context element ./baz.js [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js
|
2018-04-04 15:17:13 +02:00
|
|
|
chunk {2} 2.output.js 38 bytes <{3}> [rendered]
|
2018-09-25 17:08:35 +02:00
|
|
|
> ./foo [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo
|
|
|
|
> ./foo.js [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js
|
|
|
|
[2] ./templates/foo.js 38 bytes {2} [optional] [built]
|
2018-05-07 12:36:38 +02:00
|
|
|
[exports: default]
|
2018-09-25 17:08:35 +02:00
|
|
|
context element ./foo [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo
|
|
|
|
context element ./foo.js [4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js
|
2018-04-04 15:17:13 +02:00
|
|
|
chunk {3} output.js (main) 597 bytes >{0}< >{1}< >{2}< [entry] [rendered]
|
2019-01-25 13:15:22 +01:00
|
|
|
> ./example.js main
|
2018-09-25 17:08:35 +02:00
|
|
|
[3] ./example.js 437 bytes {3} [built]
|
2019-01-25 13:15:22 +01:00
|
|
|
single entry ./example.js main
|
2018-09-25 17:08:35 +02:00
|
|
|
[4] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object 160 bytes {3} [optional] [built]
|
|
|
|
import() context lazy ./templates [3] ./example.js 3:23-7:3
|
2017-10-11 23:30:54 +02:00
|
|
|
```
|