1.2.1 • Published 5 years ago

react-to-static-html-webpack-plugin v1.2.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

React To Static Html Webpack Plugin

npm install react-to-static-html-webpack-plugin

Introduction

This project was created to generate a html (templates) file from your react webpack entry

Example

You can try this package cloning the repository and accessing the folder example/

Getting Started

:warning: every config is optional

// webpack.config.js
const ReactToHtmlWebpackPlugin = require("react-to-html-webpack-plugin");

module.exports = {
    // ...your webpack config
    plugins: [
        new ReactToHtmlWebpackPlugin({
            globals = // {custom-global-object}
            htmlHeader = // "custom => <!DOCTYPE html>";
            chunks = // custom allowed chunks => ['<my-chunk>'];
            excludedChunks = // custom excluded chunks => ['<my-chunk>'];
            postRender = // custom post render method => [(content) => content]
            keepJsFile = // keep generated js file (not just the parsed html file)
            cache = // create cache for the running build at node_modules/.cache folder (default: true)
        });
    ]
    // ...your webpack config
}

Build and Test

No build needed

Contribute

Commit Guidelines

My commits convention is based at AngularJs Commits Convention

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago