Principle analysis of thermal renewal

Webpack Compile: Compile JS into bundles

HMR Server: outputs hot updated files to HMR Rumtime

Bundle Server: Provides access to files in the browser

HMR Rumtime: will be injected into the browser to update the file changes

Bundle.js: Build the output file

Scope Hosting features and use

  1. The code is smaller
  2. Create functions with less scope
  3. Better code readability

SSR design Idea (Webpack)

Server:

  • Render the React values as strings using the React -dom/server renderToString method
  • The server route returns the corresponding template

The client

  • Package out components for the server

Webpack packaging SSR