react-render-webpack-plugin
v1.0.4
Published
react serverside rendering for webpack.
Downloads
22
Maintainers
Readme
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>