Skip to content

Problem with Setting up Ziggy Laravel9/Vue3/inertia/vite #565

Answered by bakerkretzmar
Lx45 asked this question in Q&A
Discussion options

You must be logged in to vote

Does the ziggy.js file exist right beside your main.ts? If it does, does importing it as './ziggy.js' (including file extension) work?

Also, your .use() for the Vue plugin should have Ziggy's Vue plugin as its first argument, not the route function.

- import route from 'ziggy';
+ import { ZiggyVue } from 'ziggy'; // if this doesn't work, try importing it from `ziggy/dist/vue`

- .use(plugin,Ziggy)
+ .use(ZiggyVue, Ziggy)

Take a look at the docs for using the Vue plugin.

Replies: 3 comments 19 replies

Comment options

You must be logged in to vote
13 replies
@bakerkretzmar
Comment options

@khalidmaquilang
Comment options

@bakerkretzmar
Comment options

@khalidmaquilang
Comment options

@buzdyk
Comment options

Answer selected by Lx45
Comment options

You must be logged in to vote
6 replies
@AMINEAMIRI
Comment options

@bakerkretzmar
Comment options

@AMINEAMIRI
Comment options

@bakerkretzmar
Comment options

@AMINEAMIRI
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants