0

We have a vitejs web project and 3 local sdks (built by vitejs' lib mode).

The web project depends on the 3 sdks (through yarn link)

CURRRENT SITUATION:

Currently we have to start 4 watches (yarn dev) in 4 folders (1 project + 3 sdks), so that when we make a code change in sdk1, it auto builds into node_modules/sdk1/dist, and the web project can consume the change and reflect on the browser.

IDEAL SITUATION:

Ideally we only have to start 1 watch (yarn dev) in web project only, and it can auto watch node_modules/sdk1/src, auto build, so that code changes in sdk1/2/3 can all be auto detected and reflected on the browser. Is it possible?

References:

  1. https://dev.to/receter/how-to-create-a-react-component-library-using-vites-library-mode-4lma
  2. https://dev.to/pitops/how-to-develop-a-local-package-and-use-in-a-vite-app-1hb3
  3. https://vitejs.dev/guide/dep-pre-bundling

0

Browse other questions tagged or ask your own question.