simple-react-webpack-static-plugin
v5.0.4
Published
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.
Downloads
2
Readme
simple-react-webpack-static-plugin
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]
- default (object) Required [Template variables]
- pages (object) Required [Configuration for page templates, contains keys matching the names of each entry point in your webpack config and a default]
- 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]