# vue-ssr-html-stream **Repository Path**: vuejs/vue-ssr-html-stream ## Basic Information - **Project Name**: vue-ssr-html-stream - **Description**: Transform stream to simplify Vue SSR streaming - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-08-03 - **Last Updated**: 2025-06-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README > **DEPRECATED**: This package has been pulled into `vue-server-renderer`. # vue-ssr-html-stream [![Build Status](https://circleci.com/gh/vuejs/vue-ssr-html-stream/tree/master.svg?style=shield)](https://circleci.com/gh/vuejs/vue-ssr-html-stream/tree/master) ## Usage ``` js const HTMLStream = require('vue-ssr-html-stream') const htmlStream = new HTMLStream({ template, // string context, // ?Object outletPlaceholder // ?string, defaults to }) // pipe it renderStream .pipe(htmlStream) .pipe(responseStream) ``` - The `template` option is a string of the HTML page template. It must contain a special string which serves as the placeholder for your app's server-rendered content. The default placeholder string is `` - you can configure it with the `outletPlaceholder` option. - The `context` option should be the same context object passed to `bundleRenderer.renderToStream()`. The transform will check for a few special properties on the context when the source render stream starts emitting data: - `context.head`: any head markup that should be injected into the head of the page. - `context.styles`: any inline CSS that should be injected into the head of the page. Note that `vue-loader` 10.2.0+ (which uses `vue-style-loader` 2.0) will automatically populate this property with styles used in rendered components. - `context.state`: initial Vuex store state that should be inlined in the page as `window.__INITIAL_STATE__`. The inlined JSON is automatically sanitized with [serialize-javascript](https://github.com/yahoo/serialize-javascript). - `context.asyncChunks`: `