-
JavaScript Dynamic Imports
Dynamic imports are slightly different from static imports. While static imports have a range of limits, dynamic ones are more flexible and multidimensional. For instance, static imports are limited to the top level of the file, can’t be loaded conditionally (inside if), and the name of the package might not be determined during execution. Instead, all…
-
JavaScript Export and Import
Having a complex application makes developers scroll through hundreds and thousands of lines of code, which makes it harder for them to debug or even understand the app. Luckily, JavaScript allows overcoming such difficulties. Having import and export helps one out of the problems above. There are several syntax options for export and import directives. In the…
-
JavaScript Modules
With growing the application more extensive, there is a need to split it into multiple files: modules. As a rule, a module includes a class or a library of functions. For some time, JavaScript existed without a language-level module syntax. That wasn’t a difficulty as the scripts were small and straightforward. But, over time, the scripts became more…