Title: JavaScript Minification Errors
Last modified: December 4, 2017

---

# JavaScript Minification Errors

 *  Resolved [Rhand](https://wordpress.org/support/users/rhand/)
 * (@rhand)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/javascript-minification-errors/)
 * When I run Algolia search with WP Rocket and JavaScript minified by WP Rocket
   I get:
 *     ```
       Uncaught ReferenceError: algoliasearch is not defined
           at HTMLDocument.<anonymous> ((index):94)
           at i (a9b476399a1ace75e81cb940be005dd2.js:2)
           at Object.fireWith [as resolveWith] (a9b476399a1ace75e81cb940be005dd2.js:2)
           at Function.ready (a9b476399a1ace75e81cb940be005dd2.js:2)
           at HTMLDocument.K (a9b476399a1ace75e81cb940be005dd2.js:2)
       (anonymous) @ (index):94
       i @ a9b476399a1ace75e81cb940be005dd2.js:2
       fireWith @ a9b476399a1ace75e81cb940be005dd2.js:2
       ready @ a9b476399a1ace75e81cb940be005dd2.js:2
       K @ a9b476399a1ace75e81cb940be005dd2.js:2
       ```
   
 * and then only the header loads.
    -  This topic was modified 8 years, 6 months ago by [Rhand](https://wordpress.org/support/users/rhand/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjavascript-minification-errors%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [Rhand](https://wordpress.org/support/users/rhand/)
 * (@rhand)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/javascript-minification-errors/#post-9746766)
 * Turned off JS Minification for now as I need the site to run. Perhaps I will 
   see if I can exclude Algolia’s JS somehow and make this work. Would prefer to
   include it though.
 *  Plugin Contributor [rayrutjes](https://wordpress.org/support/users/rayrutjes/)
 * (@rayrutjes)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/javascript-minification-errors/#post-9747461)
 * Hi [@rhand](https://wordpress.org/support/users/rhand/),
 * Indeed there is a known issue with WP rocket.
 * The issue lies in disabling inlining of JS.
 * We hope to be able to fix this in the near future.
    If you find anything let 
   us know.
 * Best,
 *  Thread Starter [Rhand](https://wordpress.org/support/users/rhand/)
 * (@rhand)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/javascript-minification-errors/#post-9751179)
 * Well see [https://imwz.io/wp-rocket-algolia-search-conflict/](https://imwz.io/wp-rocket-algolia-search-conflict/).
   Using another exclusion rule
    `/wp-content/plugins/search-by-algolia-instant-
   relevant-results/(.*).js` recommended by WP Rocket it seems to be working. Again
   would have preferred your plugin not to use inline JS or inline CSS that would
   not clash. But this works

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

The topic ‘JavaScript Minification Errors’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/search-by-algolia-instant-relevant-
   results_899beb.svg)
 * [Search by Algolia – Instant & Relevant results](https://wordpress.org/plugins/search-by-algolia-instant-relevant-results/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/search-by-algolia-instant-relevant-results/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/search-by-algolia-instant-relevant-results/)
 * [Active Topics](https://wordpress.org/support/plugin/search-by-algolia-instant-relevant-results/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/search-by-algolia-instant-relevant-results/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/search-by-algolia-instant-relevant-results/reviews/)

## Tags

 * [algolia](https://wordpress.org/support/topic-tag/algolia/)
 * [minification](https://wordpress.org/support/topic-tag/minification/)
 * [WP Rocket](https://wordpress.org/support/topic-tag/wp-rocket/)

 * 3 replies
 * 2 participants
 * Last reply from: [Rhand](https://wordpress.org/support/users/rhand/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/javascript-minification-errors/#post-9751179)
 * Status: resolved