Is there a way to use it without using Typescript?
tranthaihoang opened this issue · 4 comments
I'm using Vue3 CLI which doesn't use Typescript, so can't set it up. This library is great but I can't install it because my source code doesn't use Typesciprt, hope there is a way.
Do you have some errors or steps I can follow to see the problem?
@matteobruni Thank you for responding:
I come to the step in component Vue:
import { loadFull } from 'tsparticles';
export default {
setup() {
const particlesInit = async engine => {
await loadFull(engine);
};
const particlesLoaded = async container => {
console.log('Particles container loaded', container);
};
return {
particlesInit,
particlesLoaded,
};
},
}
An error appeared:
Module not found: Error: Can't resolve 'tsparticles' in 'pathxxxx'
Before that I installed the package
yarn add vue3-particles
And set in main.js . file
import Particles from "vue3-particles";
createApp(App).use(Particles);
You need to install tsparticles
too, if you want to use loadFull
, it's not a mandatory package since there's loadSlim
from tsp articles-slim
, or manually loading plugins or presets.
@matteobruni
Thank!
I run the install command and it worked:
yarn add tsparticles
Really I see you do a lot of documentation. But it's really hard to understand. Hope you revise your documentation so that it will be easier for others like me to setup.
As with other libraries, it has the most basic setup to work, but I don't see that in your library.
Anyway I thank you very much!