Syncfusion : How to install only Grid component from Syncfusion for Angular

Syncfusion : How to install only Grid component from Syncfusion for Angular



I am working on a Web App which Uses Syncfusion grid to display tabular Data.
My App is Webpack based (not CLI). I have followed Getting Started with Webpack guide from Syncfusion website and integrated into my APP.



The grid is showing up as it's supposed to be.
The problem is, when I compile the code , the bundle size is about 19MB and almost 13MB is occupied by Syncfusion.



The help I wanted is can anybody please tell me how to install only grid component from syncfusion library? I did't found any solution which helps me to do so.



Package json :

...........
"reflect-metadata": "0.1.10",
"syncfusion-javascript": "~15.4.21",
"toastr": "2.1.2",
"underscore": "1.8.3",
"zone.js": "0.8.18",
"rxjs": "6.2.2",
"rxjs-compat": "6.2.2"
.......,




...........
"reflect-metadata": "0.1.10",
"syncfusion-javascript": "~15.4.21",
"toastr": "2.1.2",
"underscore": "1.8.3",
"zone.js": "0.8.18",
"rxjs": "6.2.2",
"rxjs-compat": "6.2.2"
.......,



Included in Vendor.ts :


import '../../node_modules/syncfusion-javascript/Content/ej/web/material/ej.web.all.min.css';
import '../../node_modules/syncfusion-javascript/Content/ej/web/responsive-css/ej.responsive.css';



Imported in Module.ts file :


import EJAngular2Module from 'ej-angular2';
imports: [
......
EJAngular2Module.forRoot(),
........
],




1 Answer
1



alam,



Thanks for your interest in Syncfusion Products



You can import the required components alone in Angular application using the below code snippet instead of EJAngular2Module importing, which includes the required modules and their corresponding source alone into Angular application build.


Angular


EJAngular2Module


Angular



import EJ_GRID_COMPONENTS from 'ej-angular2/src/ej/grid.component';


import EJ_GRID_COMPONENTS from 'ej-angular2/src/ej/grid.component';



We discussed these information in the below knowledge base article.



https://www.syncfusion.com/kb/7861/importing-required-syncfusion-angular-components-to-reduce-bundle-size



Please go through the above link and revert us back if you are facing any issues, we are always happy to assist you.



Thanks,



Karthick T





HI Karthick, Can we do the same for theme and css too? As still i can see the Syncfusion css is occupying about 1 MB of space in vendor.js file. Do we have a technique using which we can import css specific to grid only. Thanks
– programoholic
Sep 22 '18 at 7:52



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Some of your past answers have not been well-received, and you're in danger of being blocked from answering.



Please pay close attention to the following guidance:



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế