Skip to content

justin808/react_server_side_rendering_webpack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Server Rendering with ReactJs, Webpack, and Rails

SPIKE with Samnang and Justin on making React server render with Webpack!

Setup:

  1. bundle
  2. cd client && npm i
  3. $(npm bin)/webpack -w
  4. open another terminal and start rails

Notes:

  1. You can mark the globals to export in one of 2 ways: a. Use global.Something = Something (see Global.js) b. Declare in webpack config file
  2. models/execjs_renderer changes often require a server restart. However, changing the contents of the javascript file don't seem matter, so long as webpack recompiles it.

References

  1. Charlie Marsh's article "Rendering React Components on the Server"
  2. Node globals

About

Spike to get React server side rendering works with Webpack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 70.2%
  • HTML 17.7%
  • JavaScript 9.6%
  • CSS 2.5%