mirror of
https://github.com/arthyn/sphinx.git
synced 2024-12-27 09:54:24 +03:00
15 lines
533 B
TypeScript
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()]
|
|
});
|
|
};
|