Webpack Externals configuration

I am evaluating the Gantt control to be included in a Microsoft PCF control. I have a critical issue with the size of the library (3.5mb) pushing the control beyond the 4mb limit for the bundle/resource created and uploaded by the package.

One approach it would seem would be to refer the cdn and provide a webpack 4 configuration designating the gantt modules as externals.

Does someone have a working example of this configuration as I am struggling specifically the right hand side of the external as it expects a global variable from what I understand?


module.exports = {
    externals: {        
        "@syncfusion/ej2-react-gantt": "???"
    }
}

I can confirm that the build completes with different values in there... and the react wrapper loads successfully, however it has a problem loading the synfusion control.

Any functional sample of the react control being used via CDN would help.

1 Reply

GM Gopinath Muniraj Syncfusion Team January 21, 2021 10:22 AM UTC

Hi Paul, 
Thanks for contacting Syncfusion support. 
We have analyzed the query. Currently we do not have support to achieve your requirement “React CDN file support for webpack externals“ but, we have logged a feature request on this and it can be tracked through our feedback portal below. 
Please cast your vote to make it count. We will prioritize the features every release based on the demands and it will be included in any of our upcoming release.  
If you have any more specification/suggestions to the feature request, you can add it as a comment in the portal. 
Regards, 
Gopinath M 


Loader.
Up arrow icon