Rich-text Reply


mogadanez 02-25-16


Does it any suggetions how to use  optimizely with webpack


Jquery is bundled into vendor chunk, and i don't want to use "Include trimmed jQuery (1.11.3)"

DavidS 02-26-16

Re: webpack

Hi mogadanez,


Thanks for reaching out!


I understand that Webpack takes modules with dependencies and generates static assets from those modules. Would you be able to confirm?


Also, are you planning to use Optimizely with Webpack on a Single Page Application? You can find out more on how to set up Single Page Applications with Optimizely using this Knowledge Base article


"Jquery is bundled into vendor chunk, and i don't want to use "Include trimmed jQuery (1.11.3)"

Could you please expand a little bit?

If you use your own version of jQuery and place it above the Optimizely snippet, then you don't have to include a trimmed version of jQuery.





Re: webpack

I was wondering the same thing myself. It seems like the best thing to do may indeed be to let Optimizely load its separate (trimmed) version of jQuery.

The only method offered by Optimizely for including the JS on page is the standard snippet, no NPM module.

You could make jQuery available globally from within your code, that way you wouldn't have to make the browser download a separate version of jQuery. But then you'd have to have all your code load before initializing Optimizely, which may not make for the best user experience even if it does bring the total page weight down a little.