There are two main ways to add AG Grid to your application depending on your requirements and priorities with respect to bundle size / developer effort. You can install AG Grid by either using our feature complete
packages, or by cherry picking the feature
modules specific to your application's grid requirements.
Which to use?
Packages are the easiest way to use AG Grid as every feature is implicitly available. However, this will mean that your application bundle includes every grid feature, some of which are not required by your application and so bloat your bundle size.
Modules are suitable if bundle size is critical to your application. They enable you to only include the functionality you need resulting in a minimal bundle size at the cost of additional config required to register modules in your application.
If you're unsure whether to use
modules then we'd recommend starting with
packages as every grid feature is available and you do not have to worry about registering modules.
Minimize Bundle Size
If you want to minimize your bundle size then you should definitely use
modules to only include features that your application requires.