Hey @bbuilds I’ve checked this package to test and actually it works in my case without any issue.
This is how looks my app.js with it. I think your .json file with your custom options should be added after import tsparticles package, then init function into main function
something like this:
import { tsParticles } from "tsparticles";
import demoJson from './components/demoJson';
This is my test file all in one file
import { domReady } from '@roots/sage/client';
import { tsParticles } from "tsparticles";
/**
* app.main
*/
const main = async (err) => {
if (err) {
// handle hmr errors
console.error(err);
}
// application code
tsParticles.load("tsparticles", {
background: {
color: "#000000"
},
particles: {
color: { value: "#fff" },
move: {
direction: "bottom",
enable: true,
outModes: "out",
speed: 2
},
number: {
density: {
enable: true,
area: 800
},
value: 400
},
opacity: {
value: 0.7
},
shape: {
type: "circle"
},
size: {
value: 10
},
wobble: {
enable: true,
distance: 10,
speed: 10
},
zIndex: {
value: { min: 0, max: 100 }
}
}
});
};
/**
* Initialize
*
* @see https://webpack.js.org/api/hot-module-replacement
*/
domReady(main);
import.meta.webpackHot?.accept(main);