Hi All, I have been getting the following errors from Vercel when deploying the app. How do i rectify this issue? Tried this method on stackoverflow, but still stuck.
Error: No Output Directory named "dist" found after the Build completed. You can configure the Output Directory in your Project Settings.
STATIC_BUILD_NO_OUT_DIR: No Output Directory named "dist" found after the Build completed. You can configure the Output Directory in your Project Settings.
package.json
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint src --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
vite.config.js
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
build: { manifest: true, outDir: './dist'},
base: '/',
root: './src',
plugins: [react()],
})
layout of the folder:
Vercel settings