-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
fix(vue-app): multiple named views cause invalid syntax #5262
Conversation
Fixes nuxt#5096 * Reset resMap to an empty string before building the list of components * Add another.vue which fails the build if the bug is present (as the resulting .nuxt/router.js will contain a syntax error)
Faced this issue till the morning, trying to find out a solution and just came across this PR. Simple solution, working as expected 👏 I can't believe that named views was released in stable with such a bug 👀 As you changed "test/fixtures/named-views/nuxt.config.js" file; used filter method on routes will remove those which not satisfy ones in passed function, what breaks autogenerated router configuration. Am I wrong? Correct me if so |
Codecov Report
@@ Coverage Diff @@
## dev #5262 +/- ##
==========================================
+ Coverage 95.95% 95.99% +0.04%
==========================================
Files 74 74
Lines 2499 2499
Branches 634 634
==========================================
+ Hits 2398 2399 +1
+ Misses 85 84 -1
Partials 16 16
Continue to review full report at Codecov.
|
Thank you for confirming this fixes the issue!
These things happen!
I believe you can return a new array from |
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.
Thanks so far! Left you some comments
Co-Authored-By: leahciMic <leahciMic@users.noreply.github.com>
@manniL thank you for your review, I have addressed the feedback |
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.
LGTM
#5096 (comment) <- 🤔 |
@manniL I have looked at that comment, I believe there was some confusion as to how to test it. He has checked out my |
Fixes #5096
Types of changes
Description
resulting .nuxt/router.js will contain a syntax error)
Checklist: