npm

Need private packages and team management tools?Check out npm Orgs. »

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]

install

npm i simple-react-webpack-static-plugin

Downloadsweekly downloads

14

version

5.0.4

license

ISC

last publish

collaborators

  • avatar
Report a vulnerability