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:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user