Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter grazianodev

    (@grazianodev)

    After further investigating, I’ve noticed that these lines of code from the plugin’s original file:

    jQuery(document).ready(function(){
        new Favorites.Factory;
    });

    become:

    jQuery(document).ready(function(){
        new Favorites.Factory();
    });

    in the file Webpack generates. Note the extra brackets appended after Factory. I guess this could explain the second error.

    I have no idea why Webpack would add those brackets, but is there a way I can rewrite that line of code in a way that Webpack would have no problem with, hopefully?

    I’m sorry but I’m really no Javascript expert.

Viewing 1 replies (of 1 total)