Building and testing projects
We have already talked about building and testing TypeScript projects at the beginning of this book. In this section, we will go a little bit further for frontend projects, including the basis of using Webpack to load static assets as well as code linting.
Static assets packaging with webpack
Modularizing helps code keep a healthy structure and makes it maintainable. However, it could lead to performance issues if development-time code written in small modules are directly deployed without bundling for production usage. So static assets packaging becomes a serious topic of frontend engineering.
Back to the old days, packaging JavaScript files was just about uglifying source code and concatenating files together. The project might be modularized as well, but in a global way. Then we have libraries like Require.js, with modules no longer automatically exposing themselves to the global scope.
But as I have mentioned, having the client download module files separately...