• Resolved Visual Composer

    (@visualcomposer)


    Hello from Visual Composer Team ??

    We tried to use your plugin but faced an issue.
    One of your webpack chunks uses lodash node_modules library.
    ( "static/js/1.5e388f05.chunk.js": "/static/js/1.5e388f05.chunk.js", )
    which overrides the global window._ variable with lodash analog, which causes multiple issues with the native WordPress scripts like media-views.js which uses underscore.js functionality. As our editor loads that scripts asynchronously, then that script may be loaded later (after font-awesome plugin scripts) and that causes a javascript fatal error.

    The plugin shouldn’t override any global WordPress library like jQuery, underscore, backbone and etc.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author mlwilkerson

    (@mlwilkerson)

    Thank you for the report. I’ve opened a GitHub issue to resolve that.

    Also note that the current plugin version is still in a pre-release mode. Based on what we’ve learned so far (now including this report), there are some major changes in the works that may very well impact how other vendors work alongside this plugin in the WordPress ecosystem. If Visual Composer (or other vendors who stumble upon this topic) wish to invest effort into compatibility with us, it would be wise to have that forthcoming release in mind, given the significant API changes.

    Plugin Author mlwilkerson

    (@mlwilkerson)

    I’ve fixed this problem in our development branch, which I expect to release within the next couple of weeks.

    Plugin Author mlwilkerson

    (@mlwilkerson)

    I’ve just released 4.0.0-rc15 which fixes this problem. I’d be interested to hear your feedback after trying again.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Lodash overrides window._ underscore.js variable’ is closed to new replies.