You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/create-react-scripts-ssr/README.md
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,26 +18,27 @@ The server will auto reload if code changes.
18
18
By default, **webpack-dev-server is running on port: 3001** while the **server is running on 3000**.
19
19
The following environment variables are injected to `server side bundling`
20
20
21
-
`HOST`: The host that the server should be running on.
22
-
`PORT`: The port number that the server should be running on.
23
-
`PROTOCOL`: The protocol that the server should be running on.
24
-
`PUBLIC_URL`: The absolute url that the webpack-dev-server is running.
21
+
`HOST`: The host that the server should be running on.
22
+
`PORT`: The port number that the server should be running on.
23
+
`PROTOCOL`: The protocol that the server should be running on.
24
+
`PUBLIC_URL`: The absolute url that the webpack-dev-server is running.
25
25
26
26
**All client side log would be supressed in the console.**
27
-
The client build is located in `build/client`
28
-
The server build is located in `build/server`
29
-
An assets json manifest is located in `build/assets.json`, which is useful for server-side-rendering.
30
-
This script will start the `webpack-dev-server` and the `server.js`
27
+
The client build is located in `build/client`
28
+
The server build is located in `build/server`
29
+
An assets json manifest is located in `build/assets.json`, which is useful for server-side-rendering.
30
+
If autodll plugin is detected, an assets json manifest is located in `build/dll-assets.json`, which is useful for server-side-rendering.
31
+
This script will start the `webpack-dev-server` and the `server.js`
31
32
32
33
### build:server
33
-
trigger both `client side` and `server side` webpack tasks build.
34
-
An assets json manifest is located in `build/assets.json`, which is useful for server-side-rendering.
35
-
You can start the server by `node build/server` after build.
34
+
trigger both `client side` and `server side` webpack tasks build.
35
+
An assets json manifest is located in `build/assets.json`, which is useful for server-side-rendering.
36
+
You can start the server by `node build/server` after build.
36
37
37
38
# How it works?
38
39
----------------
39
-
Webpack bundle both different environment, the client side and the server side.
40
-
Make use of [assets-webpack-plugin](https://github.com/kossnocorp/assets-webpack-plugin) to produce assets mapping so that server side can know the filename produced in client side build.
40
+
Webpack bundle both different environment, the client side and the server side.
41
+
Make use of [assets-webpack-plugin](https://github.com/kossnocorp/assets-webpack-plugin) to produce assets mapping so that server side can know the filename produced in client side build.
41
42
42
43
# Usage
43
44
---------------
@@ -164,4 +165,4 @@ This step is to make the source mapping correct in the stack trace if error is t
0 commit comments