1.0.4 • Published 8 years ago

react-render-webpack-plugin v1.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

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>