simple-react-webpack-static-plugin

5.0.4 • Public • Published

simple-react-webpack-static-plugin

Build Status

This plugin creates an HTML file with static markup from each JSX entry-point in a webpack config. It expects you have written your application to use ES-2015.

Example Usage

webpack.config.js

var SimpleReactWebpackStaticPlugin = require('simple-react-webpack-static-plugin');

module.exports = {
  entry: {
    index: './path/to.jsx'
  },

  plugins: [
    new SimpleReactWebpackStaticPlugin({
      "default": {
        "title": "The title for your website"
      },
    })
  ]
};

Interface

  • SimpleReactWebpackStaticPlugin Arguments
    • pages (object) Required [Configuration for page templates, contains keys matching the names of each entry point in your webpack config and a default]
      • default (object) Required [Template variables]
        • title (string) Required for default template [Page title]
  • options (object) Optional template (string) Optional [An override function which returns a template sting] ignore-extensions (array) Optional [File extensions for NodeJs to ignore when reading your modules. This is useful if you are using webpack loaders to load non-javascript files]

Readme

Keywords

Package Sidebar

Install

npm i simple-react-webpack-static-plugin

Weekly Downloads

0

Version

5.0.4

License

ISC

Last publish

Collaborators

  • standardpixel