![]() The primaryURL is the bundle’s main resource URL. This doesn’t have to be a real-world URL for a completely offline application like our todo app. The baseURL is the URL prefix used for files in the bundle. What we are doing here is saying that we want to package the contents of the dist folder. I prefer to use the Go tooling for now, as I have found it to be the most stable. Before I take my flight, I can create a build of my application. I could be on an international flight and organize my notes in an offline application. Everyone could benefit from jotting down a few quick notes, and it could surely run offline. But let’s assume you want to create a Web Bundle for a note-taking application, complete with custom tags and folders. The kind of website or application you want to bundle isn’t necessarily important. So do not be overly concerned about the web bundle size of your application. Web bundles are not meant to replace Progressive Web Apps. Size: Your web bundle is a package of your entire site, including resources that may not be loaded right away.Signed bundles also help you avoid CORS issues when loading resources. You will need to do this if you are using Service Workers for example. Security: Similar to providing an SSL certificate for your site, you can sign bundles as well.Offline: Your entire application can be run from the web bundle, but you can still access external resources as normal.Some things to note about your bundled application. That’s quite a few options for whatever tickles your fancy. Once you create a production build, you have a few options. You write and build your application like you normally would. Buildingīuilding Web Bundles isn’t a difficult process. Maybe you’ll be taking a plane trip or a cross-country road trip with a questionable data connection. This could be useful for a large complex application on a slow connection that still needs to fetch data such as reports or user information.Īlternatively, you can bundle up your entire site, blog, or documentation and provide it as a single file for offline use. Your application can be partially offline, meaning the basic application is part of the Web Bundle and fetches data from external services. You can still use Service Workers, but with Web Bundles, we are talking really offline, running from a thumb drive kind of offline. This isn’t your typical Progressive Web App type of offline, with Service Workers. One of the main use cases for Web Bundles is providing offline capabilities. Other browser vendors are currently exploring its implementation. ![]() At this time, it is expected to ship in Chrome 104. Web bundles are binary files that can be opened directly in the browser. You can package up your site into a bundle, email it to a user, or bundle your portfolio site on flash drives that you can cleverly use like business cards. Have you ever had to create a zip file of your project and email it to someone? This is similar to how web bundles work, but in a formalized spec that can be opened directly in the browser. They provide you the ability to package up your entire website into a single bundle and share it with others. Web bundles are an exciting part of the web packaging specification.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |