Hi. Yes, you have to load it in your layout file, or add it to your ./webpack.mix.js file. The folder of the package you installed is located in the ./node_modules folder.
Let me know if you need more information. :)
Happy Laracon Week! All accounts are 60% off this week.
Hi There,
Apologies, I can see this has been discussed many times, but there seem to be so many conflicting solutions.
I'm new to npm and would like to understand how to include a package in my project
so in the root of my project I have run
npm install @google/markerclustererplus --save
and I can see it in the dependencies in my package.json file
Do I still need to load the installed js masterclusterer.js into my blade file? If so, where is the file now located so that I can load it up?
I hope this makes some sense.
@bwrigley I think you can just follow Laravel’s example, and assign the MarkerClusterer object to the window object:
window.MarkerClusterer = require('@google/markerclustererplus');
This will then allow you to use the MarkerClusterer class in subsequent scripts.
Please or to participate in this conversation.