sphinx/ui/vite.config.ts
Hunter Miller 763d727b81 renaming
2022-07-14 21:47:08 -05:00

15 lines
533 B
TypeScript

import { loadEnv, defineConfig } from 'vite';
import reactRefresh from '@vitejs/plugin-react-refresh';
import { urbitPlugin } from '@urbit/vite-plugin-urbit';
// https://vitejs.dev/config/
export default ({ mode }) => {
Object.assign(process.env, loadEnv(mode, process.cwd()));
const SHIP_URL = process.env.SHIP_URL || process.env.VITE_SHIP_URL || 'http://localhost:8080';
console.log(SHIP_URL);
return defineConfig({
plugins: [urbitPlugin({ base: 'sphinx', target: SHIP_URL, secure: false }), reactRefresh()]
});
};