Adjust config to open localhost (#188)

This commit is contained in:
Frank Noirot
2023-07-24 17:26:26 -04:00
committed by GitHub
parent 48f1d5e623
commit ca2634d523

View File

@ -1,8 +1,15 @@
import react from '@vitejs/plugin-react'
import viteTsconfigPaths from 'vite-tsconfig-paths'
import eslint from 'vite-plugin-eslint'
import dns from 'dns'
import { defineConfig } from 'vite'
const config = {
// Only needed because we run Node < 17
// and we want to open `localhost` not `127.0.0.1` on server start
// reference: https://vitejs.dev/config/server-options.html#server-host
dns.setDefaultResultOrder('verbatim')
const config = defineConfig({
server: {
open: true,
port: 3000,
@ -15,6 +22,6 @@ const config = {
viteTsconfigPaths(),
eslint(),
],
}
})
export default config