• Resolved unlex1

    (@unlex1)


    Dear Team,

    the lodash.js is loaded from a cloudflair cdn, as it is important to have all files come from your own server in germany. Is it possible to have a option to use a lodash.js stored on the plugin-files?

    That would be nice, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter unlex1

    (@unlex1)

    I tried to load the lodash from local server, but on chrome I got:

    Uncaught ReferenceError: ccb_lodash

    Please can you help me with that problem?

    Plugin Support EricStylemixThemes

    (@ericstylemixthemes)

    Hello @unlex1,

    The lodash.js loads from Cloudflare by default. To load it from your server you need to add the following snippets to functions.php on your theme:

    wp_enqueue_script( 'ccb-lodash-js', 'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js', array(), CALC_VERSION, true );

    It works if you write a handle like this, and it is important the version of the lodash.js match. Then it is required to add the following lines too.

    wp_add_inline_script( 'ccb-lodash-js', 'window.ccb_lodash = _.noConflict();' );

    I hope it helps.

    Regards

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Lodash.js loading from extern server’ is closed to new replies.