[SOLVED] Adding in Quasar with Vite #75
-
I'm struggling here to get it working on a Quasar CLI with Vite project. In the quasar config, in the vitePlugins array, I added Then, in the src/router/index.ts, replaced the exported function with the I tried reloading VSCode, restarting TypeScript server, deleting node_modules and reinstalling deps with pnpm. Searched the Issues, the Discussions, Google, nothing. Any kind answer will be read and appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
UpdateGot it working on a pure Vue 3 + Vite project (with This is the error I get in the browser on the Quasar + Vite project: And in the terminal: |
Beta Was this translation helpful? Give feedback.
-
You need to start running the dev server so the d.ts fille is generated |
Beta Was this translation helpful? Give feedback.
-
Solved
The issue was vitePlugins array in Quasar configuration. It didn't accept the package import as |
Beta Was this translation helpful? Give feedback.
Solved
typed-router.d.ts
was there. That's why I was so confused because I was following the guide step by step, even the TypeScript section.The issue was vitePlugins array in Quasar configuration. It didn't accept the package import as
vitePlugins: [ [ require("unplugin-vue-router/vite") ] ]
. I changed it tovitePlugins: [ [ "unplugin-vue-router/vite" ] ]
and it worked right away.