import path from 'node:path'; import { fileURLToPath } from 'node:url'; const webRoot = path.dirname(fileURLToPath(import.meta.url)); // Solo para Docker/Coolify: conserva intacta la configuración del editor. export default async function productionConfig() { const { default: react } = await import('@vitejs/plugin-react'); return { root: webRoot, plugins: [react()], resolve: { alias: { '@': path.resolve(webRoot, 'src') }, extensions: ['.jsx', '.js', '.json'], }, build: { outDir: path.resolve(webRoot, '../../dist/apps/web'), emptyOutDir: true, sourcemap: false, target: 'es2020', }, }; }