I’m currently using Sage 9 beta 2 for building a new theme and I am running into something I am not sure how to tackle. I’m trying to add a third-party JS library and according to this doc it’s just a matter of yarn add <package> and import it into your main, which I did.
However after running yarn run build there suppose to be a _/node_modules/ maps in my dist but there’s none. And going through the scripts folder in my dist, I notice that the third-party library has been imported into the main.js dist file. But for some reason, the inspect browser console states that it’s unable to find the class/function. Is there something I’m missing here?
Thank you very much, I’ve been trying to get this working for longer than I’d like to admit. To note: the error I had been receiving: 'Headroom' is not defined.
Can anyone explain why importing the package into main.js doesn’t work? I find things like this to be super frustrating. Why would some packages like jQuery be called in main.js but not this particular case? Any hints or documentation you could point me to would be awesome.