Skip to content

Tag: vite

What is a good file structure to have with Vite? [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 25 days ago. Improve this question I am using Vite to easily run tailwind and other npm packages in my vanilla HTML and JavaScript. This is what

React.js builds with Vite does not include service-worker.ts

I am using Vite to build an SPA with React (typescript), and I am trying to register a service-worker. I am registering the script as type module, and service-worker.ts sits at src/web-worker/service-worker.ts. There is also a tsconfig.json at src/web-worker Everything works in Dev, but when it’s built, src/web-worker/service-worker.ts is not replaced with anything equivalent. Any suggestions? index.html src/web-worker/service-worker.ts src/web-worker/tsconfig.json Answer