Sitecore sites using RequireJS conflicting with Coveo Hive
How can we prevent this or how are we supposed to configure Coveo Hive to prevent it to fail inside a page that contains RequireJS?
I have tried to include RequireJS on a page to see how it react, and I can indeed confirm that there are some conflicts.
I have no idea if those are the same conflicts that you are getting, but let's try to at least fix this issue.
I have managed to pinpoint down part of the issue:
Webpack uses a global `require` function to include external references. When RequireJS is added, webpack instead tries to use the RequireJS methods, which does not register any external dependencies that are required.
The behavior that I get is the following error:
Uncaught TypeError: Cannot read property 'addCultureInfo' of undefined at en.js:28 at en.js:33
And the Search Interface is not loaded.
However, I have managed to find a workaround: Include the Coveo Search Resources *before* including the `RequireJS` file, and everything works fine.
I really hope that it is possible for you to do this, and let me know if it worked :)