fix: ollama and lm studio url issue fix for docker and build (#1008)

* fix: ollama and lm studio url issue fix for docker and build

* vite config fix
This commit is contained in:
Anirban Kar
2025-01-06 19:18:42 +05:30
committed by GitHub
parent 3ecac25a35
commit 49c7129ded
4 changed files with 63 additions and 14 deletions

View File

@@ -4,9 +4,11 @@ import { defineConfig, type ViteDevServer } from 'vite';
import { nodePolyfills } from 'vite-plugin-node-polyfills';
import { optimizeCssModules } from 'vite-plugin-optimize-css-modules';
import tsconfigPaths from 'vite-tsconfig-paths';
import * as dotenv from 'dotenv';
import { execSync } from 'child_process';
dotenv.config();
// Get git hash with fallback
const getGitHash = () => {
try {
@@ -17,18 +19,21 @@ const getGitHash = () => {
};
export default defineConfig((config) => {
return {
define: {
__COMMIT_HASH: JSON.stringify(getGitHash()),
__APP_VERSION: JSON.stringify(process.env.npm_package_version),
// 'process.env': JSON.stringify(process.env)
},
build: {
target: 'esnext',
},
plugins: [
nodePolyfills({
include: ['path', 'buffer'],
include: ['path', 'buffer', 'process'],
}),
config.mode !== 'test' && remixCloudflareDevProxy(),
remixVitePlugin({