react-render-webpack-plugin

1.0.4 • Public • Published

react-render-webpack-plugin

react serverside rendering for webpack.

npm i react-render-webpack-plugin --save

webpack.prod.config.js:

const reactRenderPlugin = require('react-render-webpack-plugin');
module.exports = {
    plugins: [
        new reactRenderPlugin({
            'file': 'src/app.jsx', // The entry file of your app
       'parentClass': 'app-react' // the class-selector to render into
        })
    ]
}

index.html:

<!DOCTYPE html>
<html lang="en">
<body>
    <div class="app-react"></div>
    <script src="app.min.js"></script> 
</body>
</html>

Package Sidebar

Install

npm i react-render-webpack-plugin

Weekly Downloads

9

Version

1.0.4

License

MIT

Last publish

Collaborators

  • morgondag