yarn add particlesjs is a stripped down version of the other version. the solution above works (I removed the {} around particles).
I tried, yarn add particles.js
with my home.js being this:
import {particlesJS} from 'particles.js';
export default {
init() {
// JavaScript to be fired on the home page
particlesJS.load('particles-js', {JSON settings});
},
finalize() {
// JavaScript to be fired on the home page, after the init JS
},
};
But when i do that, and import in the home. I get load not defined.