Adjust config to open localhost (#188)
This commit is contained in:
@ -1,8 +1,15 @@
|
|||||||
import react from '@vitejs/plugin-react'
|
import react from '@vitejs/plugin-react'
|
||||||
import viteTsconfigPaths from 'vite-tsconfig-paths'
|
import viteTsconfigPaths from 'vite-tsconfig-paths'
|
||||||
import eslint from 'vite-plugin-eslint'
|
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: {
|
server: {
|
||||||
open: true,
|
open: true,
|
||||||
port: 3000,
|
port: 3000,
|
||||||
@ -15,6 +22,6 @@ const config = {
|
|||||||
viteTsconfigPaths(),
|
viteTsconfigPaths(),
|
||||||
eslint(),
|
eslint(),
|
||||||
],
|
],
|
||||||
}
|
})
|
||||||
|
|
||||||
export default config
|
export default config
|
||||||
Reference in New Issue
Block a user