No Webview for React + Vite + Typescript project?

Hello, I have a React project I made on my local machine and pushed to a GitHub repo. I created a new project in Replit “from existing GitHub repo.” In the .replit file, I set run = "npm run build" . The build runs successfully and compiles to the dist folder, however no web preview appears. What am I missing?

Repl link:

no code snippet cuz I have no idea where the problem is, but probably .replit or some other config file.

Hey @wdlord, welcome!

Have you tried looking for the Webview under Tools in the sidebar?

If you can’t find it there, I was able to open the website at Please let me know if this works for you. If it does, I’d recommend having a split screen of your Repl workspace and the site.

Hello thanks for the reply, I literally just figured out my problem so that’s probably why it’s working now. My vite config file did not specify a server:

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

export default defineConfig({
  plugins: [react()],
  server: {
    host: '',

Adding the server: { host: '',} fixed my problem!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.