@@ -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,13 +74,17 @@ 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.
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
+
80
88
It's typically 20,500+ files and 180+ MB.
81
89
The application itself requires a tiny fraction of that to run.
82
90
@@ -194,6 +202,11 @@ a#optimize
194
202
Each tool does something different.
195
203
They work best in combination and are mutually reinforcing.
196
204
205
+ All of these work over your original source code, so don't forget to optimize that as well!
206
+ Don't use more libraries than you need to.
207
+ For libraries that allow you to import only parts of it, do so.
208
+ A good example is RxJs, where you can import operators individually instead of the whole library.
209
+
197
210
You can use any build system you like.
198
211
Whatever system you choose, be sure to automate it so that
199
212
building for production is a single step.
@@ -259,6 +272,9 @@ a#measure
259
272
<a href="https://developers.google.com/web/tools/chrome-devtools/network-performance/understanding-resource-timing" target="_blank" title="Chrome DevTools Network Performance">
260
273
Chrome DevTools Network Performance page</a> is a good place to start learning about measuring performance.
261
274
275
+ Another good performance test is [WebPageTest](https://www.webpagetest.org/),
276
+ which you can also use it to make sure your deployment was successful
277
+
262
278
a#angular-configuration
263
279
.l-main-section
264
280
:marked
0 commit comments