{"_id":"html-webpack-include-sibling-chunks-plugin","_rev":"12-5a2f7924c70dc8571cede8123b52137e","name":"html-webpack-include-sibling-chunks-plugin","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.0":{"name":"html-webpack-include-sibling-chunks-plugin","version":"0.1.0","description":"This plugin is useful when bundling a Multiple-Page Application with webpack 4. It let `html-webpack-plugin` to include initial split chunks and runtime chunk that related to the entry js file of a html page, which are generated by `optimization.splitChun","main":"HtmlWebpackIncludeSiblingChunksPlugin.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin.git"},"keywords":["webpack"],"author":{"name":"Jiang Fengming"},"license":"MIT","bugs":{"url":"https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin/issues"},"homepage":"https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin#readme","devDependencies":{"eslint":"^4.19.1","eslint-config-enough":"^0.3.0"},"eslintConfig":{"extends":"enough","env":{"node":true}},"gitHead":"44ed22bb1600ce114d79a6e092d4f88047a5391a","_id":"html-webpack-include-sibling-chunks-plugin@0.1.0","_npmVersion":"5.8.0","_nodeVersion":"9.8.0","_npmUser":{"name":"fenivana","email":"fenivana@noindoin.com"},"dist":{"integrity":"sha512-pDGuaB/iUxrMUHeYtxIZKu+sOEVEfCQbLp8VC6ZfzitIus29m8viy3DgKvgq7RNXXvNqclYTHu8+arMXxS4cXw==","shasum":"c1f1026940ade6f58130cc3ef71408f8672e7a88","tarball":"https://registry.npmjs.org/html-webpack-include-sibling-chunks-plugin/-/html-webpack-include-sibling-chunks-plugin-0.1.0.tgz","fileCount":22,"unpackedSize":271760,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIETyAUxgKz12PMXSHB8QYO97ZPfTB6FM4yYEGqaDXFuVAiEAoRmiHXVbfUUzzpvQMgEt+h1rdoHZJ+bZyZditMAYVAc="}]},"maintainers":[{"name":"fenivana","email":"fenivana@noindoin.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-webpack-include-sibling-chunks-plugin_0.1.0_1522229003975_0.09954738952731934"},"_hasShrinkwrap":false},"0.1.1":{"name":"html-webpack-include-sibling-chunks-plugin","version":"0.1.1","description":"This plugin is useful when bundling a Multiple-Page Application with webpack 4. It let `html-webpack-plugin` to include initial split chunks and runtime chunk that related to the entry js file of a html page, which are generated by `optimization.splitChun","main":"HtmlWebpackIncludeSiblingChunksPlugin.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin.git"},"keywords":["webpack"],"author":{"name":"Jiang Fengming"},"license":"MIT","bugs":{"url":"https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin/issues"},"homepage":"https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin#readme","devDependencies":{"eslint":"^4.19.1","eslint-config-enough":"^0.3.0"},"eslintConfig":{"extends":"enough","env":{"node":true}},"gitHead":"a65e812a244691e92678507def4ec945c6991624","_id":"html-webpack-include-sibling-chunks-plugin@0.1.1","_npmVersion":"5.8.0","_nodeVersion":"9.8.0","_npmUser":{"name":"fenivana","email":"fenivana@noindoin.com"},"dist":{"integrity":"sha512-51iqT1le6FXNoUzJESNcDvFw0ZSMw+aYusSqd42lgt+k0kZOBwe0fgx+0CyW8OMI/5gDAWTwXgkPh2UkizRPNA==","shasum":"a4528d9fc08b6a09d7a0b9887243d80fa60f7e68","tarball":"https://registry.npmjs.org/html-webpack-include-sibling-chunks-plugin/-/html-webpack-include-sibling-chunks-plugin-0.1.1.tgz","fileCount":22,"unpackedSize":272382,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC09iPCnNsQ9FIiIlQrBlHi30I3Ytyg51ozcELCzj3w2AIhALu6izbcH1oUESQ2J12HBny/DTtlFXA8u/FlWc+sXDfL"}]},"maintainers":[{"name":"fenivana","email":"fenivana@noindoin.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-webpack-include-sibling-chunks-plugin_0.1.1_1523366452429_0.2842554435365121"},"_hasShrinkwrap":false},"0.1.2":{"name":"html-webpack-include-sibling-chunks-plugin","version":"0.1.2","description":"This plugin is useful when bundling a Multiple-Page Application with webpack 4. It let `html-webpack-plugin` to include initial split chunks and runtime chunk that related to the entry js file of a html page, which are generated by `optimization.splitChun","main":"HtmlWebpackIncludeSiblingChunksPlugin.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin.git"},"keywords":["webpack"],"author":{"name":"Jiang Fengming"},"license":"MIT","bugs":{"url":"https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin/issues"},"homepage":"https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin#readme","devDependencies":{"eslint":"^4.19.1","eslint-config-enough":"^0.3.0"},"eslintConfig":{"extends":"enough","env":{"node":true}},"gitHead":"865cb148cf8cc78a231b81415a007994dda32a0c","_id":"html-webpack-include-sibling-chunks-plugin@0.1.2","_npmVersion":"5.8.0","_nodeVersion":"9.8.0","_npmUser":{"name":"fenivana","email":"fenivana@noindoin.com"},"dist":{"integrity":"sha512-AWRsZHDeDTg+7lY8kHo2IpiBST1rr5Ivm72PVFM4PzdF+RRbidhXLmSkDfIagENibaPDWES2cRlsf3A4m7ub0g==","shasum":"2c550b4e2f0d089d13945dff24dff38a1329b545","tarball":"https://registry.npmjs.org/html-webpack-include-sibling-chunks-plugin/-/html-webpack-include-sibling-chunks-plugin-0.1.2.tgz","fileCount":22,"unpackedSize":272610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCftT379GP7fW+TdGa44PhsoTW2mky1zs09pddu0uB5rAIhAOUhC+53fwXRguNGx1t0eyye1mROJrsvLVAO/aqUWh36"}]},"maintainers":[{"name":"fenivana","email":"fenivana@noindoin.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-webpack-include-sibling-chunks-plugin_0.1.2_1523425826590_0.2358177369936234"},"_hasShrinkwrap":false},"0.1.3":{"name":"html-webpack-include-sibling-chunks-plugin","version":"0.1.3","description":"This plugin is useful when bundling a Multiple-Page Application with webpack 4. It let `html-webpack-plugin` to include initial split chunks and runtime chunk that related to the entry js file of a html page, which are generated by `optimization.splitChun","main":"HtmlWebpackIncludeSiblingChunksPlugin.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin.git"},"keywords":["webpack"],"author":{"name":"Jiang Fengming"},"license":"MIT","bugs":{"url":"https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin/issues"},"homepage":"https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin#readme","devDependencies":{"eslint":"^4.19.1","eslint-config-enough":"^0.3.0"},"eslintConfig":{"extends":"enough","env":{"node":true}},"gitHead":"efbffe0659c428d49a8ffaa112bea9e494698cec","_id":"html-webpack-include-sibling-chunks-plugin@0.1.3","_npmVersion":"5.8.0","_nodeVersion":"9.8.0","_npmUser":{"name":"fenivana","email":"fenivana@noindoin.com"},"dist":{"integrity":"sha512-9pT+ja6tBmp6kwMJtQdhyaokilbcj8zCiz2CZ1ZOrKoN6Mrb3UmJWLKSTzRBVFee0XjGjVU9NFUfGOGYuzj7/A==","shasum":"5f3abbacfd2b07f20a9156bdf2181f7d5f47c4ab","tarball":"https://registry.npmjs.org/html-webpack-include-sibling-chunks-plugin/-/html-webpack-include-sibling-chunks-plugin-0.1.3.tgz","fileCount":22,"unpackedSize":272694,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdvZggI+AHUuz88eSV+D1BJPeCkm/v9u5FI4B8e38iLAIgCVZUXJh66GZuDE/naDuaghBo+vai44Av9jVcOxCE0bQ="}]},"maintainers":[{"name":"fenivana","email":"fenivana@noindoin.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-webpack-include-sibling-chunks-plugin_0.1.3_1523542921435_0.8034094524774067"},"_hasShrinkwrap":false},"0.1.4":{"name":"html-webpack-include-sibling-chunks-plugin","version":"0.1.4","description":"This plugin is useful when bundling a Multiple-Page Application with webpack 4. It let `html-webpack-plugin` to include initial split chunks and runtime chunk that related to the entry js file of a html page, which are generated by `optimization.splitChun","main":"HtmlWebpackIncludeSiblingChunksPlugin.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin.git"},"keywords":["webpack"],"author":{"name":"Jiang Fengming"},"license":"MIT","bugs":{"url":"https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin/issues"},"homepage":"https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin#readme","devDependencies":{"eslint":"^4.19.1","eslint-config-enough":"^0.3.0"},"eslintConfig":{"extends":"enough","env":{"node":true}},"gitHead":"5c22b449f5c08bb7f58d09da6571e4a2eb221f24","_id":"html-webpack-include-sibling-chunks-plugin@0.1.4","_npmVersion":"5.6.0","_nodeVersion":"9.11.1","_npmUser":{"name":"fenivana","email":"fenivana@noindoin.com"},"dist":{"integrity":"sha512-C36x1bMqs35mev+lmmSm69IVMjdjHNE+OQ+p6Js0BhxRaImNgbabrTQJeiSt4Xdb4RAtSSTk12tQeQiQrGu72g==","shasum":"2fd2bea03fcd6f4df24ceeefcbc0fa41679f9047","tarball":"https://registry.npmjs.org/html-webpack-include-sibling-chunks-plugin/-/html-webpack-include-sibling-chunks-plugin-0.1.4.tgz","fileCount":22,"unpackedSize":273079,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGDRSO5rqJR6csO8KOF2GPTH3yyn5ZgQX+y1WMYTD7czAiEAoTG8FkJTAe+JGRxVJI7Gyq3V235fb4q3WGZMy71uNlY="}]},"maintainers":[{"name":"fenivana","email":"fenivana@noindoin.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-webpack-include-sibling-chunks-plugin_0.1.4_1523554567952_0.7257242545871703"},"_hasShrinkwrap":false},"0.1.5":{"name":"html-webpack-include-sibling-chunks-plugin","version":"0.1.5","description":"This plugin is useful when bundling a Multiple-Page Application with webpack 4. It let `html-webpack-plugin` to include initial split chunks and runtime chunk that related to the entry js file of a html page, which are generated by `optimization.splitChun","main":"HtmlWebpackIncludeSiblingChunksPlugin.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin.git"},"keywords":["webpack"],"author":{"name":"Jiang Fengming"},"license":"MIT","bugs":{"url":"https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin/issues"},"homepage":"https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin#readme","devDependencies":{"babel-eslint":"^8.2.3","eslint":"^4.19.1","eslint-config-enough":"^0.3.3"},"eslintConfig":{"extends":"enough","env":{"node":true}},"licenseText":"MIT License\n\nCopyright (c) 2018 Jiang Fengming\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"html-webpack-include-sibling-chunks-plugin@0.1.5","dist":{"shasum":"01c4f1139c54e49b324934cf10e82291fa9f48fe","tarball":"https://registry.npmjs.org/html-webpack-include-sibling-chunks-plugin/-/html-webpack-include-sibling-chunks-plugin-0.1.5.tgz","fileCount":30,"unpackedSize":273435,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbHeECCRA9TVsSAnZWagAAxdUP/3hOMA5tRePpYzTDmiyE\nkiNIVF8MOdkCz7rM96fpeNzOCrzo0XOHC/s7ms5JypfmHV5uN8lXiyXQD8Kd\nto4JA55hlcohcZd7c6YypM4/PTu1fu3NOAaxGCoi4IQitu04BB15ECLECl9Q\nXJpq20SHehtnc1WjW3xO4x/Fds5pD//OD3Xm/dut6k4aXQmpDavHrM7xH3JF\nDNqCJEbL/gejR9sdhSvNskybBHVYesPokZqSf/2ZQg1fjeIk9KKmxMHQYhYz\nmWR+vCLxY9UVSO2qyyStaKufbLIfQG1iB1cLSQ91igAygbzM3Sq6j/FKe/G0\nIgkRlVyMm5o3rd45QOEPUOV7IiDheuF3nV0D6Q1D2fSXrD8i/w+h2N7x7iw4\ngGc7F9VfV4TBT/KmFVOGC/GqZ9mbdER0X8zBW6fwb1BJJFGItPeNGWD/UcIt\nBJJ1sKAxQCKCDETXAI1xQ5M3EcmqDUqo87psqk/aA+xOiZD3GvxOv8gbBL2W\nXLrVUswb58TlAa1j8hkfk5njkn+xpRpJJIe6fcm6eWni2L2l4M7Qz5zjlppX\nK+9vQn7WQD1p5BGeHPViZYjfCbujMbU2/q4XzK4d1tb8AxTAQervejXl11jN\ni+u7nz9UB7uvc/l+Pclzvlc1p6tngAxvcuw7SHmcmo0e95a8iVjLnNWPBMHC\n/UmV\r\n=TkRg\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-VfrwwEaXW0Z7Uk49/lhntcK0JZnqpUPzVvBji9lUSGw2ygzdSRWiitxmHaqCtM4d4t8i84UWn2i67wlI2KV0ow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3ccnYJBLsBpWTNLMHZeop/6FPaMQD2ysZkldtB85/pAIhAPzMHKewNVnaa/nQdL+n9JXZMRPlcZhqg4D2QaTP9l9c"}]},"maintainers":[{"name":"fenivana","email":"fenivana@noindoin.com"}],"_npmUser":{"name":"fenivana","email":"fenivana@noindoin.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-webpack-include-sibling-chunks-plugin_0.1.5_1528684801733_0.6232540780204281"},"_hasShrinkwrap":false}},"time":{"created":"2018-03-28T09:23:23.975Z","0.1.0":"2018-03-28T09:23:24.067Z","modified":"2022-06-25T17:40:46.865Z","0.1.1":"2018-04-10T13:20:52.601Z","0.1.2":"2018-04-11T05:50:26.811Z","0.1.3":"2018-04-12T14:22:01.575Z","0.1.4":"2018-04-12T17:36:08.086Z","0.1.5":"2018-06-11T02:40:01.849Z"},"maintainers":[{"email":"jiangfengming87@gmail.com","name":"jiangfengming"}],"description":"This plugin is useful when bundling a Multiple-Page Application with webpack 4. It let `html-webpack-plugin` to include initial split chunks and runtime chunk that related to the entry js file of a html page, which are generated by `optimization.splitChun","homepage":"https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin#readme","keywords":["webpack"],"repository":{"type":"git","url":"git+https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin.git"},"author":{"name":"Jiang Fengming"},"bugs":{"url":"https://github.com/fenivana/html-webpack-include-sibling-chunks-plugin/issues"},"license":"MIT","readme":"# html-webpack-include-sibling-chunks-plugin\n\nThis plugin is useful when bundling a Multiple-Page Application with webpack 4.\nIt let `html-webpack-plugin` to include initial split chunks and runtime chunk that related to the entry js file of a html page,\nwhich are generated by `optimization.splitChunks` and `optimization.runtimeChunk` (https://gist.github.com/sokra/1522d586b8e5c0f5072d7565c2bee693).\n\nSuppose your MPA has the following structure (check the [example](example) folder):\n\n```\n├── dist\n├── package.json\n├── node_modules\n├── src\n│   ├── components\n│   ├── shared\n|   ├── favicon.png\n│   └── pages\n|       ├── foo                      // http://localhost:8080/foo.html\n|       |    ├── index.html\n|       |    ├── index.js\n|       |    ├── style.css\n|       |    └── pic.png\n|       └── bar                      // http://localhost:8080/bar.html\n|           ├── index.html\n|           ├── index.js\n|           ├── style.css\n|           └── baz                  // http://localhost:8080/bar/baz.html\n|               ├── index.html\n|               ├── index.js\n|               └── style.css\n└── webpack.config.js\n```\n\nYou can bundle the site using this webpack config: (check the full file: [example/webpack.config.js](example/webpack.config.js))\n\n```js\nconst HtmlWebpackPlugin = require('html-webpack-plugin')\nconst HtmlWebpackIncludeSiblingChunksPlugin = require('html-webpack-include-sibling-chunks-plugin')\nconst glob = require('glob')\n\nconst dev = Boolean(process.env.WEBPACK_SERVE)\n\nconst entries = glob.sync('./src/**/index.js')\nconst entry = {}\nconst htmlPlugins = []\nfor (const path of entries) {\n  const template = path.replace('index.js', 'index.html')\n  const chunkName = path.slice('./src/pages/'.length, -'/index.js'.length)\n  // in order to hot reload in dev, we put template file into the entry\n  entry[chunkName] = dev ? [path, template] : path\n  htmlPlugins.push(new HtmlWebpackPlugin({\n    template,\n    filename: chunkName + '.html',\n    chunksSortMode: 'none',\n    chunks: [chunkName]\n  }))\n}\n\nmodule.exports = {\n  entry,\n\n  optimization: {\n    runtimeChunk: true,\n    splitChunks: {\n      chunks: 'all'\n    }\n  },\n\n  plugins: [\n    // ...\n    // must be placed before html-webpack-plugin\n    new HtmlWebpackIncludeSiblingChunksPlugin(),\n    ...htmlPlugins\n  ]\n\n  // ...\n}\n```\n\n`entry` and `htmlPlugins` will be generated by parsing the folder structure. for example:\n\nentry:\n```js\n{\n  'bar/baz': './src/pages/bar/baz/index.js',\n  bar: './src/pages/bar/index.js',\n  foo: './src/pages/foo/index.js'\n}\n```\n\nhtmlPlugins:\n```js\n[\n  new HtmlWebpackPlugin({\n    template: './src/pages/bar/baz/index.html',\n    filename: 'bar/baz.html',\n    chunksSortMode: 'none',\n    chunks: ['bar/baz']\n  },\n\n  new HtmlWebpackPlugin({\n    template: './src/pages/bar/index.html',\n    filename: 'bar.html',\n    chunksSortMode: 'none',\n    chunks: ['bar']\n  },\n\n  new HtmlWebpackPlugin({\n    template: './src/pages/foo/index.html',\n    filename: 'foo.html',\n    chunksSortMode: 'none',\n    chunks: ['foo']\n  }\n]\n```\n\nThis plugin will insert split chunks and runtime chunk that splitted from `chunks` of `HtmlWebpackPlugin` into the html file.\n\n## Running the example project\n\n```sh\ncd example\nnpm install\nnpm run dev\n```\n\nOpen http://localhost:8080/foo.html to check the result.\n\nBuilding the production bundle:\n```sh\nnpm run build\n```\n","readmeFilename":"README.md"}