[x] I confirm that this is an issue rather than a question.
Bug report
What is actually happening?
In production mode, the block of blog in home page is not rendered and the footer is rendered twice .
Everything works fine in development mode.
Parts of frontmatter:
modules:
- Banner
- Blog
- Footer
Additionaly, there is an error in console
framework-f055c134.js:1 TypeError: (e || []).slice is not a function
at vs.fn (app-ad323f5e.js:10:38514)
at vs.run (framework-f055c134.js:1:3894)
at get value [as value] (framework-f055c134.js:1:11992)
at Rt (framework-f055c134.js:1:11070)
at Proxy.<anonymous> (app-ad323f5e.js:10:38861)
at Bn (framework-f055c134.js:1:15368)
at de (framework-f055c134.js:1:42866)
at vs.w [as fn] (framework-f055c134.js:1:42954)
at vs.run (framework-f055c134.js:1:3894)
at G.u.update (framework-f055c134.js:1:43258)
After some debug, I found the problem
This e variable is an object which doesn't have a slice function.
I searched the source code of reco and found this, the posts may be the e variable.
Bug report
What is actually happening?
In production mode, the block of blog in home page is not rendered and the footer is rendered twice .
Everything works fine in development mode.![image](https://user-images.githubusercontent.com/18400251/212310399-1c78e34c-cdea-43eb-8744-dfa488c2d774.png)
Parts of frontmatter:
Additionaly, there is an error in console
After some debug, I found the problem
This
e
variable is anobject
which doesn't have aslice
function.I searched the source code of reco and found this, the
posts
may be thee
variable.https://github.com/vuepress-reco/vuepress-theme-reco/blob/169685daea7927bb711cddda1c93679f47f02e18/packages/vuepress-theme-reco/src/client/components/Home/Blog.vue#L43-L63
This may be the code which throw this error.
After further search, I found the code where the value comes from.
https://github.com/vuepress-reco/vuepress-theme-reco/blob/169685daea7927bb711cddda1c93679f47f02e18/packages/%40vuepress-reco/plugin-page/src/client/composable/usePageData.ts#L6-L14
In production mode, theses three variables will be the same value because
Symbol.for('') === Symbol.for('')
The
posts
variable may be covered by another variable.I don't know whether this problem cause the final render error but there must be some problem.
Other relevant information