The browser bundle carries the storefront and nothing else
Hanzo CI/CD / cicd (push) Failing after 31m1s
CI/CD / cicd (push) Failing after 31m1s

src/lib/email.ts is the server half: it imports a mail transport that is in no
dependency list, so pulling it into the client graph fails resolution during
the build. email-client.ts wants five type names from it and now says so.

vite.config.ts also defined process.env.API_KEY and GEMINI_API_KEY from the
environment. No module reads either, so the defines only put a third-party key
into the bundle when one is set.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
zooqueen
2026-09-15 16:49:12 -07:00
co-authored by Hanzo Dev
parent 4fea2c56a4
commit 18225c89a3
2 changed files with 17 additions and 22 deletions
+3 -1
View File
@@ -1,4 +1,6 @@
import {
// Types only: ./email is the server half and pulls in the mail transport, which
// has no place in a browser bundle and no entry in package.json.
import type {
QuoteData,
OrderData,
SubscriptionData,
+14 -21
View File
@@ -1,25 +1,18 @@
import path from 'path';
import { defineConfig, loadEnv } from 'vite';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, '.', '');
return {
base: '/',
server: {
port: 3690,
host: '0.0.0.0',
strictPort: true,
},
plugins: [react()],
define: {
'process.env.API_KEY': JSON.stringify(env.GEMINI_API_KEY),
'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY)
},
resolve: {
alias: {
'@': path.resolve(__dirname, '.'),
}
}
};
export default defineConfig({
base: '/',
server: {
port: 3690,
host: '0.0.0.0',
strictPort: true,
},
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, '.'),
},
},
});