@@ -52,6 +52,10 @@ a#dev-deploy
52
52
53
53
The simplest way to deploy the app is to publish it to a web server
54
54
directly out of the development environment.
55
+
56
+ It's not optimized and it won't be very fast for users.
57
+ But for some situations - like demos - all you need is to put your project online.
58
+
55
59
It's already running locally. You're just copying it, almost _as is_,
56
60
to a non-local server that others can reach.
57
61
@@ -70,14 +74,19 @@ a#dev-deploy
70
74
71
75
1. Enable production mode as [described below](#enableprodmode) (optional).
72
76
73
- That's all it takes to publish your app!
77
+ That's the simplest deployment you can do.
78
+ It's not optimized, but it's online.
79
+
74
80
75
81
a#node-modules
76
82
:marked
77
83
### Load npm packages from the web (SystemJS)
78
84
79
- The `node_modules` folder of _npm packages_ is huge and slow to upload to the server.
80
- It's typically 20,500+ files and 180+ MB.
85
+ The `node_modules` folder of _npm packages_ contains much more code
86
+ than what is needed to actually run your app in the browser.
87
+ More code mean longer upload and download times.
88
+
89
+ `node_modules` for the Quickstart is typically 20,500+ files and 180+ MB.
81
90
The application itself requires a tiny fraction of that to run.
82
91
83
92
Load the _npm packages_ from the web instead.
@@ -194,6 +203,11 @@ a#optimize
194
203
Each tool does something different.
195
204
They work best in combination and are mutually reinforcing.
196
205
206
+ All of these work over your original source code, so don't forget to optimize that as well!
207
+ Don't use more libraries than you need to.
208
+ For libraries that allow you to import only parts of it, do so.
209
+ A good example is RxJs, where you can import operators individually instead of the whole library.
210
+
197
211
You can use any build system you like.
198
212
Whatever system you choose, be sure to automate it so that
199
213
building for production is a single step.
@@ -259,6 +273,9 @@ a#measure
259
273
<a href="https://developers.google.com/web/tools/chrome-devtools/network-performance/understanding-resource-timing" target="_blank" title="Chrome DevTools Network Performance">
260
274
Chrome DevTools Network Performance page</a> is a good place to start learning about measuring performance.
261
275
276
+ Another good performance test is [WebPageTest](https://www.webpagetest.org/),
277
+ which you can also use it to make sure your deployment was successful
278
+
262
279
a#angular-configuration
263
280
.l-main-section
264
281
:marked
0 commit comments