diff --git a/apps/contact/package.json b/apps/contact/package.json index 5872706..3829cb7 100644 --- a/apps/contact/package.json +++ b/apps/contact/package.json @@ -2,6 +2,8 @@ "name": "contact", "version": "0.1.0", "private": true, + "main": "api/index.ts", + "type": "module", "scripts": { "dev": "next dev --turbopack", "build": "next build", diff --git a/apps/contact/tsconfig.json b/apps/contact/tsconfig.json index 9c7e071..78979fd 100644 --- a/apps/contact/tsconfig.json +++ b/apps/contact/tsconfig.json @@ -1,40 +1,10 @@ { "compilerOptions": { - "target": "ES2017", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "paths": { - "@/*": [ - "./*" - ] - } - }, - "include": [ - "next-env.d.ts", - "**/*.ts", - "**/*.tsx", - ".next/types/**/*.ts" - ], - "exclude": [ - "node_modules" - ] + "module": "ESNext", // or "Node16", "ES2020" + "target": "ESNext", // Set target to ESNext for modern JavaScript features + "moduleResolution": "Node", // Ensures module resolution works as expected + "esModuleInterop": true, // Allows for better interop with CommonJS modules + "strict": true, // Optional but recommended for better type safety + "skipLibCheck": true // Optionally skip library checks for faster builds + } } \ No newline at end of file diff --git a/apps/website/astro.config.mjs b/apps/website/astro.config.mjs index 4c343c5..d9eb720 100644 --- a/apps/website/astro.config.mjs +++ b/apps/website/astro.config.mjs @@ -30,4 +30,17 @@ export default defineConfig({ markdown: { remarkPlugins: [remarkPlugin], }, + vite: { + server: { + proxy: { + "/api": + "https://web-contact-gloria-crocoderdev-crocoder.vercel.app/api", // Proxy API requests to your backend + }, + }, + define: { + "process.env.VITE_CONTACT_URL": JSON.stringify( + process.env.VITE_CONTACT_URL, + ), + }, + }, });