Closed 34r7h closed 1 year ago
The use(Particles)
must go where the createApp
is, the other code must go in the script of the component.
You can see a sample here: https://github.com/tsparticles/vue3/blob/41dba6a7eeff8dfc22eccd06c7f5f7a331cc0e53/apps/vue3/src/App.vue#L2
thanks Matteo. Still having trouble after copying the example.
i downloaded the vue3/apps/vue3 folder but can't install.. getting npm ERR! 404 Not Found - GET https://registry.npmjs.org/@tsparticles%2fvue3 - Not found.
i think the npm registry is looking for a different name now. vue3-particles now?
thanks Matteo. Still having trouble after copying the example.
i downloaded the vue3/apps/vue3 folder but can't install.. getting npm ERR! 404 Not Found - GET https://registry.npmjs.org/@tsparticles%2fvue3 - Not found.
i think the npm registry is looking for a different name now. vue3-particles now?
@tsparticles/vue3
will be the new package, but it's something it's not ready to be published yet. The legacy
branch contains all the v2 packages like vue3-particles
great, ok i'll keep in mind when upgrading. Thanks much.
I got it to work after fixing a mistake.. app.use(router).use(Particles);
like you gave in the example.
where I had:
createApp(App).use(Particles);
app.use(createPinia())
app.use(router)
maybe that makes two instances.
The default Vue3 app comes with app.use(router);
, that's why I appended that there.
yeah it should be there. i made an error. great work on this repo. i'm very thankful!
after the template tag, where does the js go?