Sai Srinivasan

  • Content count

  • Joined

  • Last visited

Posts posted by Sai Srinivasan

  1. I'm developing an Angular 2 application and using webpack to bundle my application together. One of my components imports the fusioncharts library stored in /lib/fusioncharts directory in the root of my project.

    Note: I dont have the fusioncharts module in node_modules.

    I was able to configure my aliases, provide plugin correctly (the bundle increased in size, and I was able to verify, through the network tab that fusion charts existed):

    import statement:

    import FusionCharts from 'fusioncharts'

    alias statement:

    'fusioncharts' : '/lib/fusioncharts/fusioncharts.js'

    provide plugin:

      new webpack.ProvidePlugin({
      $: 'jquery',
      jQuery: 'jquery',
      'window.jQuery': 'jquery',
      'window.PR': 'prettify',
      FusionCharts: 'fusioncharts',

    This lead to my bundle increasing in size, and in the network tab, I was able to locate my fusioncharts code.

    Webpack didnt throw any errors during the build, but when I launched my application, I received this in my browser console:

    Screen Shot 2018-05-25 at 10.43.01 AM.png

    Screen Shot 2018-05-24 at 11.25.45 PM.png