![]() ![]() If you want to follow along and explore the source code as you read the article, there is a Debugging webpack's source code section that you should check out first. ![]() In this article, we will only focus on NormalModules. There are other types of modules, such as ExternalModule(when using module federation) and ConcatenatedModule(when using ntext()), which are topics for separated articles. ![]() I will include, however, some links to the source code, maybe they will turn out to be useful.Īs a convention, we will refer to NormalModules simply as modules. Also, to simplify comprehension, I will replace the snippets from the source code with diagrams and simplified code snippets. As we go along, we will also explain concepts such as modules, chunks etc. Then, we will expand some of the steps from the diagram. Some details are omitted though, as they are subjects for future articles. We will start off with a diagram that depicts, not very briefly, the entire bundling process. Thus, in the last section we will see how to debug webpack's source code by going through its tests and some custom examples. ![]() The objective of this article is to give you enough insights about the entire process so that you'll be able to intervene at any point in order to understand some aspects of webpack by yourself or to debug problems. My goal with this series is for you to become more comfortable when solving webpack-related problems. You'll learn about how lazy loading works, how tree shaking works, how certain loaders work etc. This article will serve as a basis for upcoming articles in which I will dive deeper into other webpack's features. In this series of articles I'd like to share many details about the inner workings of webpack, with the hope that it will make working with webpack look more approachable. However, many people would argue it is quite a challenge to work with it, mostly due to its complexity. Webpack is a very powerful and interesting tool that can be considered a fundamental component in many of today's technologies that web developers use to build their applications. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |