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

Vue-router! #65

Closed
folamy opened this issue May 19, 2021 · 8 comments
Closed

Vue-router! #65

folamy opened this issue May 19, 2021 · 8 comments

Comments

@folamy
Copy link

folamy commented May 19, 2021

Thanks one again!
However, I am trying to have more control on routes. So, I am using the router example, but I am getting the error below:
TypeError: Cannot use 'in' operator to search for 'path' in undefined
at resolve (/home/folamy/Desktop/vue-router/node_modules/vue-router/dist/vue-router.cjs.js:2828:20)
at pushWithRedirect (/home/folamy/Desktop/vue-router/node_modules/vue-router/dist/vue-router.cjs.js:2931:51)
at Object.push (/home/folamy/Desktop/vue-router/node_modules/vue-router/dist/vue-router.cjs.js:2901:16)
at Object.render (/pages/all.page.server.js:11:10)
at renderHtmlDocument (/home/folamy/Desktop/vue-router/node_modules/vite-plugin-ssr/dist/renderPage.node.js:201:47)
at renderPageId (/home/folamy/Desktop/vue-router/node_modules/vite-plugin-ssr/dist/renderPage.node.js:116:36)
at async renderPage (/home/folamy/Desktop/vue-router/node_modules/vite-plugin-ssr/dist/renderPage.node.js:96:24)

@brillout
Copy link
Member

Hi again.

This a bug related to your code, it's not related to vite-plugin-ssr.

@folamy
Copy link
Author

folamy commented May 19, 2021

@brillout
I only copy the source code here:
[https://github.com/brillout/vite-plugin-ssr/tree/master/examples/vue-router](Router example) and I did yarn install!

@brillout
Copy link
Member

Hm I see, let me have a look.

@folamy
Copy link
Author

folamy commented May 19, 2021

Alright, thanks!

@brillout
Copy link
Member

Fixed, see 4bf62a1.

Note that currently you have to completely replace vite-plugin-ssr's routing with Vue Router.

But there is PR that I will merge today/tomorrow which will enable you to use vite-plugin-ssr's routing (Filesystem Routing and .page.route.js) and Vue Router at the same time. (Similarly to what Nuxt does.)

@folamy
Copy link
Author

folamy commented May 19, 2021

That would be great!
Thank you.

@brillout
Copy link
Member

Got delayed by a higher prio ticket. I will, tentatively, merge the PR tomorrow.

@brillout
Copy link
Member

The PR will be merged later. In case you want to get invovled: #40

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

2 participants