mirror of
https://github.com/arthyn/sphinx.git
synced 2024-12-26 09:24:04 +03:00
15 lines
553 B
TypeScript
15 lines
553 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, changeOrigin: true, secure: false }), reactRefresh()]
|
|
});
|
|
};
|