Skip to content
Discussion options

You must be logged in to vote

got it , just add this to your vite config

import { defineConfig } from 'vite';

const host = process.env.TAURI_DEV_HOST;

export default defineConfig({
  ...,
  clearScreen: false,
  server: {
    host: host || false,
    port: 5173,
    strictPort: true,
    hmr: host
      ? {
          protocol: 'ws',
          host,
          port: 5173,
        }
      : undefined,
  },
  ...,
});

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tempmail78326453432-glitch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant