I am having some issues when trying to use some other JS frameworks and jQuery plugins within the Zurb Foundation Template. For example, I am trying to use snap.svg. I placed the snap.svg.js file in src/assets/js. It automatically gets compiled into dist/assets/js/app.js. Now when I try to view my site I get a JS error that says "Uncaught TypeError: Cannot set property 'eve' of undefined." All of the JS errors I get with a few jQuery plugins are also giving me Uncaught TypeErrors.
I have a feeling this has something to do with Babel. If I open up the compiled app.js file and remove all of the snap.svg code and replace it with the code from the original snap.svg.js file everything works. So this tells me that whatever babel is changing is causing problems.
Sooo.. am I doing something wrong? I have a pretty much default install of Foundation using the Zurb Template. All I'm doing is placing the snap.svg.js file into the src/assets/js folder. Is there something else I'm missing? I've never used the Zurb Template before so I'm sure there's some aspect I'm not understanding or doing.