# neutrino-preset-web-ssr

> Extension of neutrino-preset-web focussing on SSR applications

Latest version **1.0.0** (published 2017-11-08) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install neutrino-preset-web-ssr
pnpm add neutrino-preset-web-ssr
yarn add neutrino-preset-web-ssr
bun add neutrino-preset-web-ssr
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-11-08 |
| First published | 2017-11-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tim Kelty |
| Maintainers | timkelty |
| Keywords | neutrino, neutrino-preset, web, hot module reload |

## Links

- npm: https://www.npmjs.com/package/neutrino-preset-web-ssr
- Repository: https://github.com/timkelty/neutrino-packages/tree/master/packages/neutrino-preset-web-ssr
- npm.io page: https://npm.io/package/neutrino-preset-web-ssr

## Dependencies (3)

- [neutrino-preset-web](https://npm.io/package/neutrino-preset-web.md) ^7.3.1
- [webpack-manifest-plugin](https://npm.io/package/webpack-manifest-plugin.md) ^1.3.2
- [neutrino-middleware-clean](https://npm.io/package/neutrino-middleware-clean.md) ^7.3.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2017-11-08
- 0.1.3 — 2017-11-08
- 0.1.2 — 2017-11-08

## README

# Neutrino Web SSR Preset

[neutrino-preset-web](https://neutrino.js.org/presets/neutrino-preset-web/) is generally geared toward toward single-page apps, as it uses `html-webpack-template` to generate your html templates.

This package extends `neutrino-preset-web`, tweaking it for apps that rely on SSR (server-side rendering).

## Features

- Removes `html-webpack-template`
- Serves your built assets from a directory in your web-root. (e.g. your `neutrino.options.output` may be `public/build`).
- Makes use of `webpack-manifest-plugin`, so your server-side templates have a method to reference your built assets.

### While developing (`neutrino start`):

- Requests will proxy your SSR app, with the exception of your neutrino assets.
- Assets will be in predictable location (not-revved), so they can be referenced by your server-side app.

## Options

The following shows how you can pass an options object to the preset and override its options, showing the defaults:

```js
module.exports = {
  use: [
    ['neutrino-preset-web-ssr', {

      // The address of your SSR app to proxy requests to (e.g. 'http://localhost:3000').
      // You may set this option directly, or via the `DEV_SERVER_PROXY` env var.
      devServerProxy: process.env.DEV_SERVER_PROXY,

      // The base URL for your neutrino assets. Should end in a slash. By default this is derived from `neutrino.options.output` (e.g. '/build/')
      baseUrl: `/${path.basename(neutrino.options.output)}/`,

      // By default, the `neutrino.options.output` dir will be cleaned on `neutrino start`. This can be used as a mechanism for your SSR app to determine if it should serve revved or non-revved assets.
      cleanOnStart: true,

      // Pass any options to neutrino-preset-web
      web: {

      }
    }
  ]
};
```

---
_Source: https://npm.io/package/neutrino-preset-web-ssr · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
