<commit_before># React Static Renderer
A webpack plugin that lets you render a html file for each js-bundle you got

This package is heavily inspired by <NAME>'s talk ["Building Static Sites with React"](https://www.youtube.com/watch?v=CPpM5-rXrZ4).
He has also made a [very useful webpack-plugin](https://github.com/iansinnott/react-static-webpack-plugin/) for building static sites with React Router.
This package is not coupled with React Router, and instead seeks to build independent html files for every js-bundle you have.

## Installation

```
$ npm install --save-dev react-static-renderer-webpack
```

## Usage

### Basic Example

```js
// webpack.config.js
const ReactStaticRenderer = require('react-static-renderer-webpack');
const template = require('./template.js');

module.exports = {

  entry: {
    todo: './src/todo.js',
    login: './src/login.js',
  },

  output: {
    path: path.join(__dirname, 'public'),
    filename: '[name].js',                
    libraryTarget: 'umd', // This is a requirement
    publicPath: '/',
  },

  plugins: [
    new ReactStaticRenderer({
      sources: [
        { bundle: 'todo.js', title: 'Todo App' },
        { bundle: 'login.js', title: 'Login Page' },
      ],
      defaults: {
        staticMarkup: false, // Only use if you don't want React to hook
        favicon: '/favicon.png',
        title: 'Awesome App',
        render: template.render,
        stylesheet: 'default.css',<commit_msg>fix typos in readme<commit_after># React Static Renderer
A webpack plugin that lets you render a html file for each js-bundle you got

This package is heavily inspired by <NAME>'s talk ["Building Static Sites with React"](https://www.youtube.com/watch?v=CPpM5-rXrZ4).
He has also made a [very useful webpack-plugin](https://github.com/iansinnott/react-static-webpack-plugin/) for building static sites with React Router.
This package is not coupled with React Router, and instead seeks to build independent html files for every js-bundle you have.

## Installation

```
$ npm install --save-dev react-static-renderer-webpack
```

## Usage

### Basic Example

```js
// webpack.config.js
const ReactStaticRenderer = require('react-static-renderer-webpack');
const template = require('./template.js');

module.exports = {

  entry: {
    todo: './src/todo.js',
    login: './src/login.js',
  },

  output: {
    path: path.join(__dirname, 'public'),
    filename: '[name].js',                
    libraryTarget: 'umd', // This is a requirement
    publicPath: '/',
  },

  plugins: [
    new ReactStaticRenderer({
      sources: [
        { bundle: 'todo.js', title: 'Todo App' },
        { bundle: 'login.js', title: 'Login Page' },
      ],
      defaults: {
        staticMarkup: false, // Only use if you don't want React to hook
        favicon: '/favicon.png',
        title: 'Awesome App',
        render: template.render,
        stylesheet: '/default.css',
{'fraction_non_alphanumeric': 0.13472745971888928, 'fraction_numerical': 0.0013712718546451835, 'mean_word_length': 3.0248275862068965, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4272905', 'n_tokens_mistral': 886, 'n_tokens_neox': 859, 'n_words': 278}