simple-react-webpack-static-plugin
This Webpack plug-in does one thing really well. When pluged in to a webpack config with one or more JSX entry-points, it will generate a static HTML file for each of those entry-points. This is so that your site will have static content for any reason yo
Last updated 3 years ago by standardpixel .
ISC · Original npm · Tarball · package.json
$ cnpm install simple-react-webpack-static-plugin 
SYNC missed versions from official npm registry.

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]

Current Tags

  • 5.0.4                                ...           latest (2 years ago)

12 Versions

  • 5.0.4                                ...           2 years ago
  • 5.0.3                                ...           2 years ago
  • 5.0.2                                ...           2 years ago
  • 5.0.1                                ...           2 years ago
  • 5.0.0                                ...           2 years ago
  • 1.0.6                                ...           3 years ago
  • 1.0.5                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (6)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |