Closed Zeus-Iqd closed 1 year ago
can you share a repo?
试试在vite的配置里面把build.ssr设置成false。 Try setting build.ssr to false in vite's configuration, it works in my project
@AfireHong,
thanks for the idea to explicitely set build.ssr
to false. This did help me as well.
@emersonbottero, is this a common issue? Shouldn't you/we mention it in the Readme?
it worked before, maybe something changed in the last vitepress version.. I'll do some tests first.
This fixed it for me:
async load(this, id) {
if (id !== resolvedVirtualModuleId)
return
if (!computedIndex){
// Avoid computing the index more than once
computedIndex = await IndexSearch(config.root, options)
}
return computedIndex
},
It does seem to compute it twice still, probably due to async. But at least it works.
I think #60 is a duplicate of this issue. A PR was merged to fix this issue and builds seem to be working correctly in 1.0.4-alpha.20 without the build.ssr workaround.
I use this plugin. when I npm run build .this is not working .