LibanAbdullahi
LibanAbdullahi
WWasp
Created by LibanAbdullahi on 3/6/2025 in #🙋questions
Vite + esbuild errors in Wasp dev mode
@miho I found a solution to the React refresh issues! 🎉 The problem was duplicate React refresh code being injected into files. Fixed it by: 1. Adding @vitejs/plugin-react to devDependencies 2. Creating a minimal vite.config.ts that disables HMR overlay 3. Adding a client setup function that disables React refresh in dev mode Everything works perfectly now.
12 replies
WWasp
Created by LibanAbdullahi on 3/6/2025 in #🙋questions
Vite + esbuild errors in Wasp dev mode
I'm building a job application assistant tool that helps users track applications, analyze resumes etc. It's mostly using the standard features from the OpenSaaS template - authentication, database entities, and some AI integration. Nothing particularly special in terms of configuration - I'm using the standard Wasp setup with React, TypeScript, and Tailwind. I haven't added any service workers, offline capabilities, or custom build processes beyond what's in the template. Do you think any of these aspects could be contributing to the React refresh issues? Or is this more likely related to the WSL2/Windows environment?
12 replies
WWasp
Created by LibanAbdullahi on 3/6/2025 in #🙋questions
Vite + esbuild errors in Wasp dev mode
No, I haven't explicitly configured anything for PWA. The project is based on the OpenSaaS template, and I haven't added any service worker or PWA-related code myself. However, I did notice that the error occurs specifically with React refresh injecting duplicate code.
12 replies