vike: `dist/foo/bar.page.js` files unrelated to Vike cause `vite build` to fail
Description
pnpm run build --emptyOutDir calls vite build --emptyOutDir in the examples, which should allow us to perform a clean build, however the --emptyOutDir option seems to have no effect.
I suspect the problem to be here: https://github.com/vikejs/vike/blob/main/vike/node/plugin/shared/isViteCliCall.ts
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Comments: 15 (12 by maintainers)
Commits related to this issue
- fix: don't glob page files in dist/ // #1189 — committed to vikejs/vike by lourot 8 months ago
- Fix import.meta.glob after #1192 // #1189 — committed to vikejs/vike by lourot 8 months ago
- Fix import.meta.glob after #1192 // #1189 — committed to vikejs/vike by lourot 8 months ago
Oh I see, thanks, does that ring a bell @brillout ? TL;DR: the bug description is wrong. This is about
dist/something-different-from-client-or-server/something.page.jsbeing somehow picked up by Vite, although this seems to be outside Vite’soutDir, which we manipulate to bedist/client/.