Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple Import in app.js not working Vue3 /Inertia #41

Open
Sublan opened this issue Feb 28, 2024 · 0 comments
Open

Simple Import in app.js not working Vue3 /Inertia #41

Sublan opened this issue Feb 28, 2024 · 0 comments

Comments

@Sublan
Copy link

Sublan commented Feb 28, 2024

import Toaster from "@meforma/vue-toaster";
createInertiaApp({
title: (title) => ${title} - ${appName},
resolve: (name) => resolvePageComponent(./Pages/${name}.vue, import.meta.glob('./Pages/**/*.vue')),
setup({ el, App, props, plugin }) {
return createApp({ render: () => h(App, props) })
.use(plugin)
.use(Toaster)
.use(ZiggyVue)
.mount(el);
},

Vue File :
Tried
toast.show(Hey! I'm here);
this.$toast.show(Hey! I'm here);
Error : toast is not defined

Import inside vue file works fine , import from app.js not working // Laravel , Vue3 , InertiaJs , ViteJs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant