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

Most upvoted comments

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.js being somehow picked up by Vite, although this seems to be outside Vite’s outDir, which we manipulate to be dist/client/.