mirror of
https://github.com/hanzoai/computer.git
synced 2026-09-30 20:55:46 +00:00
The browser bundle carries the storefront and nothing else
Hanzo CI/CD / cicd (push) Failing after 31m1s
CI/CD / cicd (push) Failing after 31m1s
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:
@@ -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
@@ -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, '.'),
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user