{"name":"bundle-loader","version":"0.5.6","author":{"name":"Tobias Koppers @sokra"},"description":"bundle loader module for webpack","license":"MIT","main":"index.js","files":["index.js"],"engines":{"node":">= 4"},"scripts":{"release":"standard-version"},"dependencies":{"loader-utils":"^1.1.0"},"devDependencies":{"standard-version":"^4.0.0"},"repository":{"type":"git","url":"git+https://github.com/webpack-contrib/bundle-loader.git"},"bugs":{"url":"https://github.com/webpack-contrib/bundle-loader/issues"},"homepage":"https://webpack.js.org/loaders/bundle-loader","gitHead":"8597dd4151ecdd1e275f40879b92d830b77a3487","_id":"bundle-loader@0.5.6","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"michael-ciniawsky","email":"michael.ciniawsky@gmail.com"},"dist":{"integrity":"sha512-SUgX+u/LJzlJiuoIghuubZ66eflehnjmqSfh/ib9DTe08sxRJ5F/MhHSjp7GfSJivSp8NWgez4PVNAUuMg7vSg==","shasum":"6c9042e62f1c89941458805a3a479d10f34c71fd","tarball":"http://registry-npm.ywwl.com/bundle-loader/download/bundle-loader-0.5.6.tgz","npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2lQ4CRA9TVsSAnZWagAAxuIP/199ucoPa6AFfbQVbFTf\ncZyA0KPkRLe7K/q0PAQ38ldil2gFXEgnVi7/5g4oMuhE/akvMjyxWkxRhDmm\nuxjiFS+e0cHX9AGvWkDfmgGzOF0Pv3YufEhGLUEZED3/WS7fj1O065fJgQMA\nb56WymxgCUDNs0mEYT0NYASVdb9RNSH2uygnKZOy5ee7v/HwmlG5XEWbgBSo\nax0LkgetTOb4NaOuPpOALes4gjVKGCIo3kY6/ieZIHk2xKvLQDrOm/R1XRf5\nkE0tb7LIeaK1mawnycUMCjclmP+v+Vb1BUQBXvHmJHA9gGtcqzCFXvvk6Xxi\nnBOMokiwF2gB1d/vT+cz6/myKZbxSSXGz0UawreSDrICQbqF4vavHoYRXRvm\nBvVUgAVNggSEnqcdV1XIJbil8G1sd6GQwVl6Z9/mVTnErnT2B9beLSQWKkpA\nJszvbN19P9ywzr1Um1sHSvlc8FMF1MxKa/t5TuKvvYYjB30QxZns5daX9PxL\n2U8I90r4mX3b4mQrr/VkG39nDOsQNiGD49JXBnFF7IezhUqR48iSf0TDVNTh\n4X5uonWtTjM1NK7zGWFvzbVfqYzTxx+pcfdmM9e4JbdbNJ6co21VzikPixQx\nIMcVotov/PO7fqJBNkNhXMs+Yqi+Aioafs53weXZ3i37RBJjjQO0xmxfpEqN\n0Swv\r\n=p87c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgRyyAxVZTSGYIuLB6LVgmvNqc5TwlHoRPsCqlYGnyrAIge9t4iqzPDLHXqeFQ3bRQW6J+JtPmmkO7hHyteOAQ788="}],"size":3765,"noattachment":false,"key":"/bundle-loader/-/bundle-loader-0.5.6.tgz"},"maintainers":[{"email":"michael.ciniawsky@gmail.com","name":"michael-ciniawsky"},{"email":"eric@smarterspam.com","name":"ericclemmons"},{"email":"bebraw@gmail.com","name":"bebraw"},{"email":"mail@johannesewald.de","name":"jhnns"},{"email":"sean.larkin@cuw.edu","name":"thelarkinn"},{"email":"tobias.koppers@googlemail.com","name":"sokra"},{"email":"j.tangelder@gmail.com","name":"jtangelder"},{"email":"wiens.joshua@gmail.com","name":"d3viant0ne"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bundle-loader-0.5.6.tgz_1517826700560_0.5104169617407024"},"directories":{},"readme":"[![npm][npm]][npm-url]\n[![node][node]][node-url]\n[![deps][deps]][deps-url]\n[![tests][tests]][tests-url]\n[![coverage][cover]][cover-url]\n[![chat][chat]][chat-url]\n\n<div align=\"center\">\n  <a href=\"https://github.com/webpack/webpack\">\n    <img width=\"200\" height=\"200\"\n      src=\"https://cdn.rawgit.com/webpack/media/e7485eb2/logo/icon.svg\">\n  </a>\n  <h1>Bundle Loader</h1>\n  <p>Bundle loader for webpack<p>\n</div>\n\n<h2 align=\"center\">Install</h2>\n\n```bash\nnpm i bundle-loader --save\n```\n\n<h2 align=\"center\"><a href=\"https://webpack.js.org/concepts/loaders\">Usage</a></h2>\n\n**webpack.config.js**\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.bundle\\.js$/,\n        use: 'bundle-loader'\n      }\n    ]\n  }\n}\n```\n\nThe chunk is requested, when you require the bundle.\n\n**file.js**\n```js\nimport bundle from './file.bundle.js';\n```\n\nTo wait until the chunk is available (and get the exports)\nyou need to async wait for it.\n\n```js\nbundle((file) => {\n  // use the file like it was required\n  const file = require('./file.js')\n});\n```\n\nThis wraps the `require('file.js')` in a `require.ensure` block\n\nMultiple callbacks can be added. They will be executed in the order of addition.\n\n```js\nbundle(callbackTwo)\nbundle(callbackThree)\n```\n\nIf a callback is added after dependencies were loaded, it will be called immediately.\n\n<h2 align=\"center\">Options</h2>\n\n|Name|Type|Default|Description|\n|:--:|:--:|:-----:|:----------|\n|**`lazy`**|`{Boolean}`|`false`|Loads the imported bundle asynchronously|\n|**`name`**|`{String}`|`[id].[name]`|Configure a custom filename for your imported bundle|\n\n### `lazy`\n\nThe file is requested when you require the `bundle-loader`. If you want it to request it lazy, use:\n\n**webpack.config.js**\n```js\n{\n  loader: 'bundle-loader',\n  options: {\n    lazy: true\n  }\n}\n```\n\n```js\nimport bundle from './file.bundle.js'\n\nbundle((file) => {...})\n```\n\n> ℹ️  The chunk is not requested until you call the load function\n\n### `name`\n\nYou may set name for a bundle using the `name` options parameter.\nSee [documentation](https://github.com/webpack/loader-utils#interpolatename).\n\n**webpack.config.js**\n```js\n{\n  loader: 'bundle-loader',\n  options: {\n    name: '[name]'\n  }\n}\n```\n\n> :warning: chunks created by the loader will be named according to the\n[`output.chunkFilename`](https://webpack.js.org/configuration/output/#output-chunkfilename) rule, which defaults to `[id].[name]`. Here `[name]` corresponds to the chunk name set in the `name` options parameter.\n\n<h2 align=\"center\">Examples</h2>\n\n```js\nimport bundle from './file.bundle.js'\n```\n\n**webpack.config.js**\n``` js\nmodule.exports = {\n  entry: {\n   index: './App.js'\n  },\n  output: {\n    path: path.resolve(__dirname, 'dest'),\n    filename: '[name].js',\n    // or whatever other format you want\n    chunkFilename: '[name].[id].js',\n  },\n  module: {\n    rules: [\n      {\n        test: /\\.bundle\\.js$/,\n        use: {\n          loader: 'bundle-loader',\n          options: {\n            name: 'my-chunk'\n          }\n        }\n      }\n    ]\n  }\n}\n```\n\nNormal chunks will show up using the `filename` rule above, and be named according to their `[chunkname]`.\n\nChunks from `bundle-loader`, however will load using the `chunkFilename` rule, so the example files will produce `my-chunk.1.js` and `file-2.js` respectively.\n\nYou can also use `chunkFilename` to add hash values to the filename, since putting `[hash]` in the bundle options parameter does not work correctly.\n\n<h2 align=\"center\">Maintainers</h2>\n\n<table>\n  <tbody>\n    <tr>\n      <td align=\"center\">\n        <a href=\"https://github.com/bebraw\">\n          <img width=\"150\" height=\"150\" src=\"https://github.com/bebraw.png?v=3&s=150\">\n          </br>\n          Juho Vepsäläinen\n        </a>\n      </td>\n      <td align=\"center\">\n        <a href=\"https://github.com/d3viant0ne\">\n          <img width=\"150\" height=\"150\" src=\"https://github.com/d3viant0ne.png?v=3&s=150\">\n          </br>\n          Joshua Wiens\n        </a>\n      </td>\n      <td align=\"center\">\n        <a href=\"https://github.com/michael-ciniawsky\">\n          <img width=\"150\" height=\"150\" src=\"https://github.com/michael-ciniawsky.png?v=3&s=150\">\n          </br>\n          Michael Ciniawsky\n        </a>\n      </td>\n      <td align=\"center\">\n        <a href=\"https://github.com/evilebottnawi\">\n          <img width=\"150\" height=\"150\" src=\"https://github.com/evilebottnawi.png?v=3&s=150\">\n          </br>\n          Alexander Krasnoyarov\n        </a>\n      </td>\n    </tr>\n  <tbody>\n</table>\n\n\n[npm]: https://img.shields.io/npm/v/bundle-loader.svg\n[npm-url]: https://npmjs.com/package/bundle-loader\n\n[node]: https://img.shields.io/node/v/bundle-loader.svg\n[node-url]: https://nodejs.org\n\n[deps]: https://david-dm.org/webpack-contrib/bundle-loader.svg\n[deps-url]: https://david-dm.org/webpack-contrib/bundle-loader\n\n[tests]: http://img.shields.io/travis/webpack-contrib/bundle-loader.svg\n[tests-url]: https://travis-ci.org/webpack-contrib/bundle-loader\n\n[cover]: https://coveralls.io/repos/github/webpack-contrib/bundle-loader/badge.svg\n[cover-url]: https://coveralls.io/github/webpack-contrib/bundle-loader\n\n[chat]: https://badges.gitter.im/webpack/webpack.svg\n[chat-url]: https://gitter.im/webpack/webpack\n","publish_time":1517826701446,"_cnpm_publish_time":1517826701446,"dist-tags":{"latest":"0.5.6"}}