# react-router-html-webpack-plugin

> Marrying react-router with html-webpack-plugin

Latest version **0.2.1** (published 2016-09-29) · 0 weekly downloads

## Install

```sh
npm install react-router-html-webpack-plugin
pnpm add react-router-html-webpack-plugin
yarn add react-router-html-webpack-plugin
bun add react-router-html-webpack-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2016-09-29 |
| First published | 2016-09-18 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^6.1.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | saiichihashimoto |

## Links

- npm: https://www.npmjs.com/package/react-router-html-webpack-plugin
- Repository: https://github.com/saiichihashimoto/react-router-html-webpack-plugin
- Homepage: https://github.com/saiichihashimoto/react-router-html-webpack-plugin#readme
- Issues: https://github.com/saiichihashimoto/react-router-html-webpack-plugin/issues
- npm.io page: https://npm.io/package/react-router-html-webpack-plugin

## Dependencies (3)

- [lodash.uniq](https://npm.io/package/lodash.uniq.md) ^4.5.0
- [html-webpack-plugin](https://npm.io/package/html-webpack-plugin.md) ^2.22.0
- [react-router-to-array](https://npm.io/package/react-router-to-array.md) ^0.1.2

## Recent versions

- 0.2.1 (latest) — 2016-09-29
- 0.2.0 — 2016-09-29
- 0.1.1 — 2016-09-27
- 0.1.0 — 2016-09-27
- 0.0.1 — 2016-09-18

## README

# react-router-html-webpack-plugin

[![npm version][npm-version-badge]][npm-url]
[![npm downloads][npm-downloads-badge]][npm-url]
[![Travis][travis-badge]][travis-url]
[![Codecov][codecov-badge]][codecov-url]
[![semantic-release][semantic-release-badge]][semantic-release-url]
[![Commitizen][commitizen-badge]][commitizen-url]

# **This is a work in progress and hasn't been implemented yet!!!**
# **It will not work as intended!!!**

- You use [React Router][react-router-url]
- You use [webpack][webpack-url]
- You want a full static website that you can host on something like [GitHub Pages][github-pages-url]
- You like [HTML Webpack Plugin][html-webpack-plugin-url] and want a drop-in replacement html files from [React Router][react-router-url] routes
- You want **React Router HTML Webpack Plugin** :smile:

## Installation

Install the plugin with npm:
```shell
$ npm install react-router-html-webpack-plugin --save-dev
```

## Basic Usage

Basic usage copies [HTML Webpack Plugin][html-webpack-plugin-usage-url]:

```javascript
var ReactRouterHtmlWebpackPlugin = require('react-router-html-webpack-plugin');
var webpackConfig = {
  // ...
  plugins: [
    // ...
    new ReactRouterHtmlWebpackPlugin(),
    // ...
  ],
  // ...
};
```

## Configuration

You can pass a hash of configuration options to ReactRouterHtmlWebpackPlugin, exactly like [HTML Webpack Plugin][html-webpack-plugin-configuration-url]. Allowed values are the same except for some differences:

- `routes`: The routes file to generate routes from. Ignores routes and acts exactly like [HTML Webpack Plugin][html-webpack-plugin-url] when omitted.
- `filename`: For each route, the file to write the HTML to. Defaults to `['[route].html', '[route]/index.html']` if `routes` is set. An array of strings writes to each file. For example:
    - With the default configuration, matching `foo/bar` writes to both `<output.path>/foo/bar.html` and `<output.path>/foo/bar/index.html`
  - In the case of the base route (ie `/`), this value will make assumptions to produce sane values. For example:
    - `[route].html` or `[route]/index.html` writes to `<output.path>/index.html`
    - `subdirectory/[route]/index.html` writes to `<output.path>/subdirectory/index.html`

[codecov-badge]: https://img.shields.io/codecov/c/github/saiichihashimoto/react-router-html-webpack-plugin.svg?style=flat-square&maxAge=86400
[codecov-url]: https://codecov.io/gh/saiichihashimoto/react-router-html-webpack-plugin
[commitizen-badge]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square&maxAge=86400
[commitizen-url]: http://commitizen.github.io/cz-cli
[github-pages-url]: https://pages.github.com
[html-webpack-plugin-configuration-url]: https://github.com/ampedandwired/html-webpack-plugin/blob/master/README.md#configuration
[html-webpack-plugin-usage-url]: https://github.com/ampedandwired/html-webpack-plugin/blob/master/README.md#basic-usage
[html-webpack-plugin-url]: https://www.npmjs.com/package/html-webpack-plugin
[npm-downloads-badge]: https://img.shields.io/npm/dm/react-router-html-webpack-plugin.svg?style=flat-square&maxAge=86400
[npm-version-badge]: https://img.shields.io/npm/v/react-router-html-webpack-plugin.svg?style=flat-square&maxAge=86400
[npm-url]: https://www.npmjs.com/package/react-router-html-webpack-plugin
[react-router-url]: https://www.npmjs.com/package/react-router
[semantic-release-badge]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square
[semantic-release-url]: https://github.com/semantic-release/semantic-release
[travis-badge]: https://img.shields.io/travis/saiichihashimoto/react-router-html-webpack-plugin/master.svg?style=flat-square&maxAge=86400
[travis-url]: https://travis-ci.org/saiichihashimoto/react-router-html-webpack-plugin
[webpack-url]: http://webpack.github.io

---
_Source: https://npm.io/package/react-router-html-webpack-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
