geoproject-app/vite.config.js
isUnknown 052c6958f3
Some checks failed
Deploy / Build and Deploy to Production (push) Failing after 26s
feat: configure CI/CD with Forgejo Actions
- Add Forgejo workflow for automated build and deploy
- Build creates dist/ from public/ then adds Vue app build
- Configure Vite to build to dist/assets/dist with fixed filenames
- Deploy entire dist/ directory to production via FTP
- Add workflow documentation with FTP setup instructions

The workflow mirrors the GitLab CI approach: dist/ is created during build
and synchronized to production root on every push to main.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-11 13:39:32 +01:00

26 lines
730 B
JavaScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vite.dev/config/
export default defineConfig({
plugins: [vue()],
publicDir: false, // Les assets statiques sont gérés par Kirby dans public/
build: {
outDir: 'dist/assets/dist',
emptyOutDir: true,
manifest: false,
rollupOptions: {
output: {
entryFileNames: 'index.js',
chunkFileNames: '[name].js',
assetFileNames: (assetInfo) => {
// Le CSS principal doit s'appeler index.css pour correspondre à header.php
if (assetInfo.name && assetInfo.name.endsWith('.css')) {
return 'index.css'
}
return '[name].[ext]'
}
}
}
}
})