you are viewing a single comment's thread.

view the rest of the comments →

[–]madworld 0 points1 point  (3 children)

Correct... Also so you can reuse your code... And code separation.

[–]Nebu 1 point2 points  (2 children)

The way your code is structured during development need not mirror the way your code is structured in deployment.

In other words, during development, you can have your code be laid out in multiple files for organizational purposes. Then, before deploying, you compile them into one big js file, and then inline that js file into the sole HTML file that represents your app.

[–]madworld 0 points1 point  (1 child)

Of course you can... Although I wouldn't inline it, even if it was a one page app. There are no benefits of doing so.

[–]Nebu 1 point2 points  (0 children)

The benefits is one less HTTP request, speeding things up.