Vite + React: Autoreload Local Library

  Kiến thức lập trình

I am working on a React + Vite project with Firebase. I share some logic between firebase functions and the frontend, so I want to extract that to a shared library. I have set my directories up up as follows:

 - src
 - functions
 - shared

I am using Vite for hot reloading pages as I make changes to them. Is there a way to configure vite so that it automatically recompiles the library in shared whenever I update it and installs the new version?

2

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

Vite + React: Autoreload Local Library

I am working on a React + Vite project with Firebase. I share some logic between firebase functions and the frontend, so I want to extract that to a shared library. I have set my directories up up as follows:

 - src
 - functions
 - shared

I am using Vite for hot reloading pages as I make changes to them. Is there a way to configure vite so that it automatically recompiles the library in shared whenever I update it and installs the new version?

2

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT