-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat(module): leverage vue-router redirect #37
base: master
Are you sure you want to change the base?
feat(module): leverage vue-router redirect #37
Conversation
Codecov Report
@@ Coverage Diff @@
## master #37 +/- ##
=======================================
Coverage ? 100%
=======================================
Files ? 2
Lines ? 37
Branches ? 9
=======================================
Hits ? 37
Misses ? 0
Partials ? 0
Continue to review full report at Codecov.
|
Thanks so far! |
Could you give me an example of how you're thinking? |
@manniL if change if (this.options.mode === 'spa') { to this.nuxt.hook('generate:before', () => { What I tested would solve the problem well. |
@ricardogobbosouza but then the extended route isn't included in the build bundle / |
@manniL It worked perfectly with the test I did local |
I will work on this change and its tests, but we will still have that divergence:
|
Hmm... right. 🤔 |
@manniL The only way to work in both cases is to use What do you think of switching to |
Or do we create different options for the |
I wrote a |
Hi guys! Is it abandoned? Seems like that without this feature, the module is useless. |
@@ -18,7 +18,7 @@ | |||
"access": "public" | |||
}, | |||
"scripts": { | |||
"dev": "nuxt test/fixture", | |||
"dev": "nuxt test/fixture/univesal", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo univesal
>universal
Due to lack of maintenance I forked that repo with merged client routing (thanks @ricardogobbosouza !) https://github.com/Bravado-network/nuxt-redirects What I also added:
|
I put new properties in the
path
andredirect
rules because the redirection done by the vue-router is different so the user can customize it if necessary.For example, vue-router does not accept
^/abc
in spa mode, but in universal mode this is acceptable, in spa mode/abc/(:id)
this is acceptable, no longer in universal mode.This
/abc
redirection per example is acceptable in both modes.Resolve #3