Dup Goto 📝

Config1

PT2/webdev/vite/basics 07-31 13:46:49
To Pop
15 lines, 49 words, 344 chars Monday 2023-07-31 13:46:49

To make listen on all interfaces (i.e. 0.0.0.0), edit vite.config and use

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
  server: {
    host: true
  }
})

The server: { host: true } makes vite listen on all interfaces.