{"_id":"vue-ssr-webpack-plugin","_rev":"13-788c127e9e17cd4bd3ee32e5f361add6","name":"vue-ssr-webpack-plugin","description":"webpack plugin for generating a bundle manifest to use with Vue 2.x bundleRenderer","dist-tags":{"latest":"3.0.0"},"versions":{"1.0.0":{"name":"vue-ssr-webpack-plugin","version":"1.0.0","description":"webpack plugin for generating a bundle manifest to use with Vue 2.x bundleRenderer","main":"index.es5.js","scripts":{"build":"buble index.js > index.es5.js","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/vuejs/vue-ssr-webpack-plugin.git"},"keywords":["vue","ssr","webpack","plugin"],"author":{"name":"Evan You"},"license":"MIT","bugs":{"url":"https://github.com/vuejs/vue-ssr-webpack-plugin/issues"},"homepage":"https://github.com/vuejs/vue-ssr-webpack-plugin#readme","devDependencies":{"buble":"^0.15.2"},"gitHead":"e4e38dc53ab447cb29aa457f975d877baa7ee984","_id":"vue-ssr-webpack-plugin@1.0.0","_shasum":"00b35a6b7d23689c65c1af838ef416b0a772b8f5","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"yyx990803","email":"yyx990803@gmail.com"},"dist":{"shasum":"00b35a6b7d23689c65c1af838ef416b0a772b8f5","tarball":"https://registry.npmjs.org/vue-ssr-webpack-plugin/-/vue-ssr-webpack-plugin-1.0.0.tgz","integrity":"sha512-tEa1ZIQG6k30VqOudABWJ8IkGq9vQ584tSGuiFznZDFHdPHQpMFZUFdrqH+UDW808kO7ZQM+0OPImxkYAiH/6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzj7ieHfGGRx2iuCyrCFMwYpfAyXPx33iYr4HD9ZCg/QIgLS7zm0NTB/qKm7UTFM4dRyGd4vmuWfiAnyDkxrfwzd4="}]},"maintainers":[{"name":"yyx990803","email":"yyx990803@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/vue-ssr-webpack-plugin-1.0.0.tgz_1485470964706_0.8249446826521307"}},"1.0.1":{"name":"vue-ssr-webpack-plugin","version":"1.0.1","description":"webpack plugin for generating a bundle manifest to use with Vue 2.x bundleRenderer","main":"index.es5.js","scripts":{"build":"buble index.js > index.es5.js","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/vuejs/vue-ssr-webpack-plugin.git"},"keywords":["vue","ssr","webpack","plugin"],"author":{"name":"Evan You"},"license":"MIT","bugs":{"url":"https://github.com/vuejs/vue-ssr-webpack-plugin/issues"},"homepage":"https://github.com/vuejs/vue-ssr-webpack-plugin#readme","devDependencies":{"buble":"^0.15.2"},"dependencies":{"chalk":"^1.1.3"},"gitHead":"9396bab3c91983eaf3c4b5a22f47c101a9befaa5","_id":"vue-ssr-webpack-plugin@1.0.1","_shasum":"f24fe13e6bb7da6b4b078f3499e6a24461080ecf","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"yyx990803","email":"yyx990803@gmail.com"},"dist":{"shasum":"f24fe13e6bb7da6b4b078f3499e6a24461080ecf","tarball":"https://registry.npmjs.org/vue-ssr-webpack-plugin/-/vue-ssr-webpack-plugin-1.0.1.tgz","integrity":"sha512-5/bQ+rhdH1vgtImySPPe+aWNgoomsHf4S/2IxAjn9AygKZzkcHihfD9Zde5rAfNn0M8m1ufxLjnctY1d6JAY7A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgEPDv2kbjS6JAUIz16e2YYtOjyqBGowOBULSVFuOw6gIhANPphpS24PuF8qJLhTU059h+HbNWO8d8dXv9afHObVZA"}]},"maintainers":[{"name":"yyx990803","email":"yyx990803@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/vue-ssr-webpack-plugin-1.0.1.tgz_1485974356382_0.33653920399956405"}},"1.0.2":{"name":"vue-ssr-webpack-plugin","version":"1.0.2","description":"webpack plugin for generating a bundle manifest to use with Vue 2.x bundleRenderer","main":"index.es5.js","scripts":{"build":"buble index.js > index.es5.js","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/vuejs/vue-ssr-webpack-plugin.git"},"keywords":["vue","ssr","webpack","plugin"],"author":{"name":"Evan You"},"license":"MIT","bugs":{"url":"https://github.com/vuejs/vue-ssr-webpack-plugin/issues"},"homepage":"https://github.com/vuejs/vue-ssr-webpack-plugin#readme","devDependencies":{"buble":"^0.15.2"},"dependencies":{"chalk":"^1.1.3"},"gitHead":"e4fe6d80676cc06d508898b24c4e9bfd9bc1d0b2","_id":"vue-ssr-webpack-plugin@1.0.2","_shasum":"d093f266180966b6072d25900e01fd67b2deffff","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"yyx990803","email":"yyx990803@gmail.com"},"dist":{"shasum":"d093f266180966b6072d25900e01fd67b2deffff","tarball":"https://registry.npmjs.org/vue-ssr-webpack-plugin/-/vue-ssr-webpack-plugin-1.0.2.tgz","integrity":"sha512-Um2fuG9LS/Fw/1MlJVLA7PFvgikjnGYCy4E3kRpcd5hYnRuT7U9msMCQLmu79kHP2YccRGnWSZRyzvYy3cg2JA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDBe/hj5C7TZuSMH9bx2Ukw7CWmyXmfjLAt2viDrPTAvAiEAspgDdPcpVBnD0132TCkXq3DywYjl5hk+3PLSt/T+qdU="}]},"maintainers":[{"name":"yyx990803","email":"yyx990803@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/vue-ssr-webpack-plugin-1.0.2.tgz_1487176538025_0.3305005931761116"}},"1.0.3":{"name":"vue-ssr-webpack-plugin","version":"1.0.3","description":"webpack plugin for generating a bundle manifest to use with Vue 2.x bundleRenderer","main":"index.es5.js","scripts":{"build":"buble index.js > index.es5.js","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/vuejs/vue-ssr-webpack-plugin.git"},"keywords":["vue","ssr","webpack","plugin"],"author":{"name":"Evan You"},"license":"MIT","bugs":{"url":"https://github.com/vuejs/vue-ssr-webpack-plugin/issues"},"homepage":"https://github.com/vuejs/vue-ssr-webpack-plugin#readme","devDependencies":{"buble":"^0.15.2"},"dependencies":{"chalk":"^1.1.3"},"gitHead":"5502e486239790f8c26ca5ea2ad4336983c46604","_id":"vue-ssr-webpack-plugin@1.0.3","_shasum":"e9c32722d476c9d36b3d60e818d5077f4bf71c6d","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"yyx990803","email":"yyx990803@gmail.com"},"dist":{"shasum":"e9c32722d476c9d36b3d60e818d5077f4bf71c6d","tarball":"https://registry.npmjs.org/vue-ssr-webpack-plugin/-/vue-ssr-webpack-plugin-1.0.3.tgz","integrity":"sha512-CiaSYVeY40v1a8vU1QtrHCI+TZuoRBVQHS21yo0uwjUyBMDK8ZeFQOism6Y6qWCQlYPAfjmIQ17uSkFwfs9XLA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCy4JhVtxuYw0uPQ2YuRDmxw6zUj+SicTWUhqvqh+zMVwIgMrImPtLgh0ibzcXKLMFUsXSlydZRb01IQ8hXBFTpkNA="}]},"maintainers":[{"name":"yyx990803","email":"yyx990803@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/vue-ssr-webpack-plugin-1.0.3.tgz_1490757961811_0.9975778763182461"}},"2.0.0":{"name":"vue-ssr-webpack-plugin","version":"2.0.0","description":"webpack plugin for generating a bundle manifest to use with Vue 2.x bundleRenderer","main":"lib/index.js","scripts":{"build":"buble src -o lib","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/vuejs/vue-ssr-webpack-plugin.git"},"keywords":["vue","ssr","webpack","plugin"],"author":{"name":"Evan You"},"license":"MIT","bugs":{"url":"https://github.com/vuejs/vue-ssr-webpack-plugin/issues"},"homepage":"https://github.com/vuejs/vue-ssr-webpack-plugin#readme","devDependencies":{"buble":"^0.15.2"},"dependencies":{"chalk":"^1.1.3","hash-sum":"^1.0.2"},"gitHead":"8787e964f1ea2bc40e045d1fb5ffc0956836c9cc","_id":"vue-ssr-webpack-plugin@2.0.0","_shasum":"7cc6d8850c313c5de1509be483014cda7167a048","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"yyx990803","email":"yyx990803@gmail.com"},"dist":{"shasum":"7cc6d8850c313c5de1509be483014cda7167a048","tarball":"https://registry.npmjs.org/vue-ssr-webpack-plugin/-/vue-ssr-webpack-plugin-2.0.0.tgz","integrity":"sha512-AoWCFKV6dzUFqmYUNoM5ExEFe3I9hF0vuQHO0v3rWoHdLp1cjG2ilh/maB+PufxGy2y6AxwxsrD6VlOvAlvv0Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfr18svWtnFySf6acwac1BEm9DN0TLC8c4M0Vd6qcZ0AIhAOLRmUK4W/EKyQxX8sVZ77gVYGwba0OU+tMuHkyZSrXb"}]},"maintainers":[{"name":"yyx990803","email":"yyx990803@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/vue-ssr-webpack-plugin-2.0.0.tgz_1490858305119_0.2100150331389159"},"deprecated":"please use 3.0 instead"},"2.0.1":{"name":"vue-ssr-webpack-plugin","version":"2.0.1","description":"webpack plugin for generating a bundle manifest to use with Vue 2.x bundleRenderer","main":"lib/index.js","scripts":{"build":"buble src -o lib","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/vuejs/vue-ssr-webpack-plugin.git"},"keywords":["vue","ssr","webpack","plugin"],"author":{"name":"Evan You"},"license":"MIT","bugs":{"url":"https://github.com/vuejs/vue-ssr-webpack-plugin/issues"},"homepage":"https://github.com/vuejs/vue-ssr-webpack-plugin#readme","devDependencies":{"buble":"^0.15.2"},"dependencies":{"chalk":"^1.1.3","hash-sum":"^1.0.2"},"gitHead":"00cf80bbdf5fca9d535dba40fdd598e9cc39e388","_id":"vue-ssr-webpack-plugin@2.0.1","_shasum":"dc9d442961ebe2bb49eb06638ce141ef2ecd68b8","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"yyx990803","email":"yyx990803@gmail.com"},"dist":{"shasum":"dc9d442961ebe2bb49eb06638ce141ef2ecd68b8","tarball":"https://registry.npmjs.org/vue-ssr-webpack-plugin/-/vue-ssr-webpack-plugin-2.0.1.tgz","integrity":"sha512-+GgEMFuUNGO0TyNSAJGmiXT7HdmPBECbLUX/KFucP94DPx09tBjLS/R8R8JWqEfxE8w3YO+sP1G3jHbHDjiPmQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCY7JTErUqiZvOpf4niGg6DfXTgynhIOS5Kus876doPxwIhALxt6ohKfJVu8iYc1G7TmXJHMlQwXFQeERJIlGiK7IeR"}]},"maintainers":[{"name":"yyx990803","email":"yyx990803@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/vue-ssr-webpack-plugin-2.0.1.tgz_1490860057522_0.8195428655017167"},"deprecated":"please use 3.0 instead"},"2.0.2":{"name":"vue-ssr-webpack-plugin","version":"2.0.2","description":"webpack plugin for generating a bundle manifest to use with Vue 2.x bundleRenderer","main":"lib/index.js","files":["lib"],"scripts":{"build":"buble src -o lib","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/vuejs/vue-ssr-webpack-plugin.git"},"keywords":["vue","ssr","webpack","plugin"],"author":{"name":"Evan You"},"license":"MIT","bugs":{"url":"https://github.com/vuejs/vue-ssr-webpack-plugin/issues"},"homepage":"https://github.com/vuejs/vue-ssr-webpack-plugin#readme","devDependencies":{"buble":"^0.15.2"},"dependencies":{"chalk":"^1.1.3","hash-sum":"^1.0.2"},"gitHead":"ca1e10d7d645a9633e6f9d60f5367b8f5e32259f","_id":"vue-ssr-webpack-plugin@2.0.2","_shasum":"80709e7d53e1fe7085ad3dc73afff71c069be715","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"yyx990803","email":"yyx990803@gmail.com"},"dist":{"shasum":"80709e7d53e1fe7085ad3dc73afff71c069be715","tarball":"https://registry.npmjs.org/vue-ssr-webpack-plugin/-/vue-ssr-webpack-plugin-2.0.2.tgz","integrity":"sha512-d/Xt634IY4kFWiTlkklvAdHUXrNwaUBWPPTIynG/z33jHcLmHdKNbZzn0HyQdiqX0gpxc3z2Xnaoxh500dxcBg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAdYw+zeIM4UDSAJSeXNhgEt6gwPG0aIvPd+Rx2y9SLEAiBM5FN2Y7v3qkl9TQAqAr3WWtRmbzk5OCFqKSd48qtMLg=="}]},"maintainers":[{"name":"yyx990803","email":"yyx990803@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/vue-ssr-webpack-plugin-2.0.2.tgz_1490862569053_0.3818970089778304"},"deprecated":"please use 3.0 instead"},"2.1.0":{"name":"vue-ssr-webpack-plugin","version":"2.1.0","description":"webpack plugin for generating a bundle manifest to use with Vue 2.x bundleRenderer","main":"lib/index.js","files":["lib"],"scripts":{"build":"buble src -o lib","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/vuejs/vue-ssr-webpack-plugin.git"},"keywords":["vue","ssr","webpack","plugin"],"author":{"name":"Evan You"},"license":"MIT","bugs":{"url":"https://github.com/vuejs/vue-ssr-webpack-plugin/issues"},"homepage":"https://github.com/vuejs/vue-ssr-webpack-plugin#readme","devDependencies":{"buble":"^0.15.2"},"dependencies":{"chalk":"^1.1.3","hash-sum":"^1.0.2"},"gitHead":"d171442e03d7816420c838ef791a32bdcb3b3092","_id":"vue-ssr-webpack-plugin@2.1.0","_shasum":"acfb3a9b94562a21b9a6fb9f1f8967c3882417a2","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"yyx990803","email":"yyx990803@gmail.com"},"dist":{"shasum":"acfb3a9b94562a21b9a6fb9f1f8967c3882417a2","tarball":"https://registry.npmjs.org/vue-ssr-webpack-plugin/-/vue-ssr-webpack-plugin-2.1.0.tgz","integrity":"sha512-tOeuXVm6hurEsT6Eix2FAdklisIveAJHMHQ9SJfY89PFrMEC2V2VBSK4SOVwvjnbi9wYNG+hJK7+iMIj1CEEVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDTJp/+zSFHN4EGIouD/u5po+Xbn3mxm0Wyt0ZRAOUB9AiEAxWwSvjtaeCiddegyT6EdyTQ8XUa6IzORP/4y7Qxie3M="}]},"maintainers":[{"name":"yyx990803","email":"yyx990803@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/vue-ssr-webpack-plugin-2.1.0.tgz_1490880970529_0.8979338374920189"}},"3.0.0":{"name":"vue-ssr-webpack-plugin","version":"3.0.0","description":"webpack plugin for generating a bundle manifest to use with Vue 2.x bundleRenderer","main":"lib/index.js","files":["lib"],"scripts":{"build":"buble src -o lib","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/vuejs/vue-ssr-webpack-plugin.git"},"keywords":["vue","ssr","webpack","plugin"],"author":{"name":"Evan You"},"license":"MIT","bugs":{"url":"https://github.com/vuejs/vue-ssr-webpack-plugin/issues"},"homepage":"https://github.com/vuejs/vue-ssr-webpack-plugin#readme","devDependencies":{"buble":"^0.15.2"},"dependencies":{"chalk":"^1.1.3","hash-sum":"^1.0.2"},"gitHead":"8e7a49f498b280398c535e2f85bb78865c775367","_id":"vue-ssr-webpack-plugin@3.0.0","_shasum":"db47769ed8e71c8eb53aa9ae7be9ff04baf546fa","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"yyx990803","email":"yyx990803@gmail.com"},"dist":{"shasum":"db47769ed8e71c8eb53aa9ae7be9ff04baf546fa","tarball":"https://registry.npmjs.org/vue-ssr-webpack-plugin/-/vue-ssr-webpack-plugin-3.0.0.tgz","integrity":"sha512-DY5eIg6ECPiOwYA99xY2y4mOo5nbDh2MaklvRd2Wta2b52IZChV22QanauZQbbE06dm8UmooMTdGY0FzqUveEA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuoIp55q0hHfbKfXvqw9V5EYx1kFe2YK5vB38/YmbyWQIhANigXSy5cNAd9wHsNO0e8zHooKBNo5v7/pgYCDpW+XM9"}]},"maintainers":[{"name":"yyx990803","email":"yyx990803@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/vue-ssr-webpack-plugin-3.0.0.tgz_1492078088304_0.5854861419647932"}}},"readme":"# vue-ssr-webpack-plugin\n\nA Webpack plugin for generating a server-rendering bundle that can be used with Vue 2.x's [bundleRenderer](https://github.com/vuejs/vue/tree/dev/packages/vue-server-renderer#why-use-bundlerenderer). **This plugin requires `vue-server-renderer@^2.2.0`**.\n\n### Why?\n\nWhen you use Webpack's on-demand code-splitting feature (via `require.ensure` or dynamic `import`), the resulting server-side bundle will contain multiple separate files. This plugin simplifies the workflow by automatically packing these files into a single JSON file that can be passed to `bundleRenderer`.\n\n### Usage\n\n``` bash\nnpm install vue-ssr-webpack-plugin --save-dev\n```\n\n``` js\n// in your webpack server bundle config\nconst { VueSSRServerPlugin } = require('vue-ssr-webpack-plugin')\n\nmodule.exports = {\n  target: 'node',\n  entry: '...',\n  output: {\n    path: '...',\n    filename: '...',\n    libraryTarget: 'commonjs2'\n  },\n  // ...\n  plugins: [\n    new VueSSRServerPlugin()\n  ]\n}\n```\n\nBy default, the resulting bundle JSON will be generated as `vue-ssr-bundle.json` in your Webpack output directory. You can customize the filename by passing an option to the plugin:\n\n``` js\nnew VueSSRPlugin({\n  filename: 'my-bundle.json'\n})\n```\n\nUsing the generated bundle is straightforward:\n\n``` js\nconst { createBundleRenderer } = require('vue-server-renderer')\nconst bundle = require('/path/to/my-bundle.json')\nconst renderer = createBundleRenderer(bundle) // can also directly pass the absolute path string.\n```\n\n**Note:** your server bundle should have single entry, so avoid using `CommonsChunkPlugin` in your server bundle config.\n\n### Client Manifest\n\n> Requires vue-server-renderer@^2.3 and vue-ssr-webpack-plugin@^2.0\n\n`vue-server-renderer` 2.2 supports rendering the entire HTML page with the `template` option. 2.3 introduces another new feature, which allows us to pass a manifest of our client-side build to the `bundleRenderer`. This provides the renderer with information of both the server AND client builds, so it can automatically infer and inject preload/prefetch directives and script tags into the rendered HTML. This is particularly useful when rendering a bundle that leverages webpack's on-demand code splitting features: we can ensure the right chunks are preloaded/prefetched, and also directly embed `<script>` tags for needed async chunks in the HTML to avoid waterfall requests on the client, thus improving TTI (time-to-interactive).\n\nTo generate a client manifest, you need to add the client plugin to your client webpack config. In addition:\n\n- Make sure to use `CommonsChunkPlugin` to split the webpack runtime into its own entry chunk, so that async chunks can be injected **after** the runtime and **before** your main app code.\n\n- Since in this case `vue-server-renderer` will be dynamically injecting the asset links, you don't need to use `html-webpack-plugin`. However, the setup only handles JavaScript. If you want to use `html-webpack-plugin` for embedding other types of assets (e.g fonts), you can still use it - just make sure to configure it with `inject: false` so that it doesn't duplicate-inject the scripts.\n\n``` js\n// in your webpack client bundle config\nconst webpack = require('webpack')\nconst { VueSSRClientPlugin } = require('vue-ssr-webpack-plugin')\n\nmodule.exports = {\n  // ...\n  plugins: [\n    // this splits the webpack runtime into a leading chunk\n    // so that async chunks can be injected right after it.\n    // this also enables better caching for your app/vendor code.\n    new webpack.optimize.CommonsChunkPlugin({\n      name: 'manifest',\n      minChunks: Infinity\n    }),\n    // this will generate the client manifest JSON file.\n    new VueSSRClientPlugin()\n  ]\n}\n```\n\nThis will generate an additional `vue-ssr-client-manifest.json` file in your build output. Simply require and pass it to the `bundleRenderer`:\n\n``` js\nconst { createBundleRenderer } = require('vue-server-renderer')\n\nconst template = require('fs').readFileSync('/path/to/template.html', 'utf-8')\nconst serverBundle = require('/path/to/vue-ssr-bundle.json')\nconst clientManifest = require('/path/to/vue-ssr-client-manifest.json')\n\nconst renderer = createBundleRenderer(serverBundle, {\n  template,\n  clientManifest\n})\n```\n\nWith this setup, your server-rendered HTML for a build with code-splitting will look something like this:\n\n``` html\n<html><head>\n  <!-- chunks used for this render should have preload -->\n  <link rel=\"preload\" href=\"/manifest.js\" as=\"script\">\n  <link rel=\"preload\" href=\"/main.js\" as=\"script\">\n  <link rel=\"preload\" href=\"/0.js\" as=\"script\">\n  <!-- unused async chunks should have prefetch -->\n  <link rel=\"prefetch\" href=\"/1.js\" as=\"script\">\n</head><body>\n  <div data-server-rendered=\"true\"><div>async</div></div>\n  <!-- manifest chunk should be first -->\n  <script src=\"/manifest.js\"></script>\n  <!-- async chunks should be before main chunk -->\n  <script src=\"/0.js\"></script>\n  <script src=\"/main.js\"></script>\n</body></html>`\n```\n\nNote the renderer by default only generates preload links for JavaScript assets. You can apply fine-grained control on what to add preload links for using the `shouldPreload` option:\n\n``` js\nconst renderer = createBundleRenderer(serverBundle, {\n  template,\n  clientManifest,\n  shouldPreload: (file, type) => {\n    // type is inferred based on the file extension.\n    // https://fetch.spec.whatwg.org/#concept-request-destination\n    if (type === 'script') {\n      return true\n    }\n    if (type === 'font') {\n      // only preload woff2 fonts\n      return /\\.woff2$/.test(file)\n    }\n    if (type === 'image') {\n      // only preload important images\n      return file === 'hero.jpg'\n    }\n  }\n})\n```\n","maintainers":[{"name":"yyx990803","email":"yyx990803@gmail.com"}],"time":{"modified":"2022-06-28T20:26:02.665Z","created":"2017-01-26T22:49:25.289Z","1.0.0":"2017-01-26T22:49:25.289Z","1.0.1":"2017-02-01T18:39:17.035Z","1.0.2":"2017-02-15T16:35:39.998Z","1.0.3":"2017-03-29T03:26:03.669Z","2.0.0":"2017-03-30T07:18:26.993Z","2.0.1":"2017-03-30T07:47:39.470Z","2.0.2":"2017-03-30T08:29:29.319Z","2.1.0":"2017-03-30T13:36:10.769Z","3.0.0":"2017-04-13T10:08:08.533Z"},"homepage":"https://github.com/vuejs/vue-ssr-webpack-plugin#readme","keywords":["vue","ssr","webpack","plugin"],"repository":{"type":"git","url":"git+https://github.com/vuejs/vue-ssr-webpack-plugin.git"},"author":{"name":"Evan You"},"bugs":{"url":"https://github.com/vuejs/vue-ssr-webpack-plugin/issues"},"license":"MIT","readmeFilename":"README.md"}