It would be convenient to be able to install a single feature by using NPM's scope packages, a bit like angular did with their modules.
So this:
npm install primeng
would become:
npm install @primeng/calendar
+1
Can this be added to the V2 milestone? Would help reduce bundle sizes for most apps. Also reduces risk upgrading one component without having to retest all other components.
Using https://chrisbateman.github.io/webpack-visualizer/ - primeng is 696kb (raw), for comparison @angular/core is 367.9kb. For my app, I only need to use 3 primeng components, totaling 90kb. primeng has a large number of components to choose from (which is great!!) but it would be great if we could only reference the ones that are used within our app.
We'll consider this when there are more requests, however I think if you import the module name instead of PrimeNG, you'll have a smaller bundle using the following convention;
import {ComponentModule} from 'primeng/components/componentname/componentname';
try;
import {AccordionModule} from 'primeng/components/accordion/accordion';
Convention is:
instead of ;
import {AccordionModule} from 'primeng/primeng';
So your bundle will just have accordion instead of other PrimeNG modules.
That reduces the bundle size massively, thanks! Docs should use that convention instead of the full import so everyone gets a smaller bundle by default.
Most helpful comment
We'll consider this when there are more requests, however I think if you import the module name instead of PrimeNG, you'll have a smaller bundle using the following convention;
try;
Convention is:
instead of ;
So your bundle will just have accordion instead of other PrimeNG modules.