Getting error while loading UMD module which imports highcharts (“Highcharts JS v5.0.14”) from main module (angular4). Please find the attached sample application code with issue. The application details,
- Created the “amat-apf-analytics” UMD module (“amat-apf-analytics.umd.js”) to be utilized across different application. “/test/src” folder module will be converted as a single “amat-apf-analytics.umd.js” bundle by using gulp (“test/gulpfile.js” – gulp configuration file). This “amat-apf-analytics.umd.js” is imported highcharts into it. Highcharts is included as external module in “gulpfile.js” since it is external to the amat-apf-analytics UMD bundle.
- Highcharts is configured in “system.config.js”. It will get loaded before loading amat-apf-analytics module.
- Main application is located in /test/APF folder and it will load highcharts and amat-apf-analytics from “/test/APF node_modules/”.
- While loading getting the below error,