![]() ![]() When working with third-party libraries, you should always consider loading them from an external location: either a public CDN or a hosting location owned by your organization. The total page size grows significantly, taking longer to load and leading to a poor user experience, particularly on slower networks. As a result, users working with your solution end up downloading the same library multiple times, once with each component. Using existing libraries allows you to be more productive and lets you focus on the added value for your organization, instead of on developing generic functionality.īy default, when referencing third-party libraries in your project, SharePoint Framework includes them in the generated bundle. When building SharePoint Framework solutions, you can benefit from many existing JavaScript libraries to solve common problems. Don't include third-party libraries in the bundle Still, the release build is always smaller than a debug build, which is why you should always deploy the output of release builds to production. The difference in size between the debug and release version of the generated bundle differs depending on the libraries used in your project. The debug version of the bundle is 1255 KB while its release equivalent is only 177 KB. To illustrate the difference, compare the size of the debug and release version of a SharePoint Framework project with a web part using Angular. The main difference between the output of a debug and release build is that the release version of the generated bundle is minified and smaller in size than its debug equivalent. But when your code is finished and is working as expected, you should build it in release mode to optimize it for running in the production environment.įor more information about building your project in release mode, see SharePoint Framework toolchain. By default, SharePoint Framework projects are built in debug mode, which makes it easier for you to debug code. When building a SharePoint Framework project, you can choose whether you want to build it in a debug or release mode. This article illustrates the main differences between debug and release builds and shows how you can optimize your bundle for use in production environments. When deploying SharePoint Framework solutions to production, you should always use a release build of your project that is optimized for performance. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |