feat(module): leverage vue-router redirect#37
feat(module): leverage vue-router redirect#37ricardogobbosouza wants to merge 1 commit intonuxt-community:masterfrom ricardogobbosouza:feat-vue-router-redirect
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. |
| }, | ||
| "scripts": { | ||
| "dev": "nuxt test/fixture", | ||
| "dev": "nuxt test/fixture/univesal", |
|
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
pathandredirectrules 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
^/abcin spa mode, but in universal mode this is acceptable, in spa mode/abc/(:id)this is acceptable, no longer in universal mode.This
/abcredirection per example is acceptable in both modes.Resolve #3