tangle_indexer


git clone https://radroots.dev/git/tangle_indexer.git
Log | Files | Refs | Submodules | LICENSE

vite.config.ts (576B)


      1 import { sveltekit } from '@sveltejs/kit/vite';
      2 import tailwindcss from '@tailwindcss/vite';
      3 import { config as dotenvConfig } from 'dotenv';
      4 import { defineConfig } from 'vite';
      5 
      6 export default defineConfig(({ mode }) => {
      7 	const dev = mode === "development";
      8 	dotenvConfig({ path: dev ? ".env.development" : ".env.production" });
      9 	const port = process.env.PORT ? Number(process.env.PORT) : 3000;
     10 	return {
     11 		plugins: [
     12 			tailwindcss(),
     13 			sveltekit()
     14 		],
     15 		clearScreen: !dev,
     16 		server: {
     17 			port,
     18 			strictPort: true,
     19 			host: dev ? "0.0.0.0" : "localhost",
     20 		},
     21 	};
     22 });
     23