Closed haiting closed 1 year ago
I have the same problem. When I updated the latest dependency, the error disappeared, but I still could not search in the build environment.
I couldn't replicate this error! could you share an repo? (couldn't make the stackblitz to work...)
Hi I got the same error. My repo is https://github.com/httpyac/httpyac.github.io#51 but you need to revert commit https://github.com/httpyac/httpyac.github.io/commit/3796c70c97dbfccb681776c1505de41736dc6b97. Maybe it helps.
Hi I got the same error. My repo is https://github.com/httpyac/httpyac.github.io#51 but you need to revert commit httpyac/httpyac.github.io@3796c70. Maybe it helps.
but you try to set it up in docs/.vitepress/config.js ..
it should be in docs/vite.config.ts
it seams the above cases are the same!
@emersonbottero thx. That did the trick. It is some kind of unexpected that configuration also works in config.ts, but only in dev build. Maybe highlight this issue in your readme or add some kind of build warning (if possible) to prevent this issue.
Hi I got the same error. My repo is https://github.com/httpyac/httpyac.github.io#51 but you need to revert commit httpyac/httpyac.github.io@3796c70. Maybe it helps.
but you try to set it up in docs/.vitepress/config.js ..
it should be in docs/vite.config.ts
it seams the above cases are the same!
wow, It works!
docs/.vitepress/config.ts
docs/vite.config.ts
But what is the difference between the two settings?
The first one is vitepress configuration specific..
The second one is a vite configuration and uses roll-up lifecycle to change behavior.
@emersonbottero thx. That did the trick. It is some kind of unexpected that configuration also works in config.ts, but only in dev build. Maybe highlight this issue in your readme or add some kind of build warning (if possible) to prevent this issue.
I think I can warn! 😁
It works! Thx!!!
It's working on vitepress dev
when run
pnpm run build
then
pnpm run preview
the search is not working, and show these error on console:
online project demo
https://stackblitz.com/edit/vitejs-vite-amht1g?file=src%2Fcomponents.js,docs%2F.vitepress%2Fconfig.js