path correction

This commit is contained in:
sandhiya-hepl
2026-07-15 18:10:26 +05:30
parent 35e439e69c
commit e84c1adac4
19 changed files with 87 additions and 35 deletions
+21 -17
View File
@@ -4,22 +4,26 @@ import { resolve } from 'path'
// Dev: http://localhost:5173/admin.html (base "/")
// Prod: https://demo.cavinkare.in/citpl_website/admin.html (base "/citpl_website/")
export default defineConfig(({ command }) => ({
base: command === 'serve' ? '/' : '/citpl_website/',
plugins: [react()],
server: {
proxy: {
'/api': 'http://localhost:3001',
'/uploads': 'http://localhost:3001',
},
},
build: {
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
admin: resolve(__dirname, 'admin.html'),
preview: resolve(__dirname, 'preview.html'),
export default defineConfig((configEnv) => {
const isDev = configEnv.command === 'serve'
return {
base: isDev ? '/' : '/citpl_website/',
plugins: [react()],
server: {
proxy: {
'/api': 'http://localhost:3001',
'/uploads': 'http://localhost:3001',
},
},
},
}))
build: {
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
admin: resolve(__dirname, 'admin.html'),
preview: resolve(__dirname, 'preview.html'),
},
},
},
}
})