Building an app with Vite in a subdirectory

Hello everyone,

I would like to know if you can build a react app with Vite inside a subdirectory (e.g. /app). I would also like to keep the other directories and the project root directory untouched because there is a preexisting website there.

Currently my netlify.toml looks like this:

[build]
  base = "."
  command = "cd app && npm ci && npm run build"
  publish = "app/dist"
  functions = "app/netlify/functions"

If anyone knows how to get Vite to build a app in a subdirectory if would be much appreciated.

base: app,

command: npm run build

publish: dist

It still builds index.html in the root directory however the assets are in app/assets.

Could you share a link to the site?