steelforesight/vite.config.ts

23 lines
592 B
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
import path from 'path'
// hosts allowed through Vite's host check (for tunnels: tunnelmole, localtunnel, cloudflare)
const ALLOWED_TUNNEL_HOSTS = ['.tunnelmole.net', '.loca.lt', '.trycloudflare.com']
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
server: {
allowedHosts: ALLOWED_TUNNEL_HOSTS,
},
preview: {
allowedHosts: ALLOWED_TUNNEL_HOSTS,
},
})