In this tutorial, you’ll use import maps and JavaScript modules to import code without build tools. Import maps won’t completely replace build tools that perform many other valuable actions like building style sheets and handling images, but they will allow you to bootstrap new JavaScript applications quickly and easily using only the native browser functionality. The build systems are flexible enough that they can be configured to load code as needed, but the process takes some work.īuild tools are an important part of the development experience, but a spec called import maps will allow you to both import external code into your project without a build tool and it will only load the code when it is needed at runtime. The user will load the code regardless of whether they ever need to execute it. But by default most build systems will bundle all the code into one large file. After the build is set up, you can add and integrate new code with ease, but there are still some problems.įor example, you may need a library in just one part of your application, a part of the application most users may never need, like an admin page. To be able to install and use external code libraries, you’ll need a build tool that can parse the code and bundle the libraries that you import into a final format. IntroductionĮxternal libraries can add complexity to a new JavaScript project. The author selected Creative Commons to receive a donation as part of the Write for DOnations program.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |