You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a vue application which is having dependency on two local dependencies - lib-a and lib-c. lib-a is also having dependency on lib-c. So the dependency graph look as follows -
vue application
lib-a
lib-c
lib-c
We are using vite lib mode for building both lib-a and lib-c but none of these are having any vue components. We are also using local linking for both the libs in package.json files of both vue and lib-a projects. All three projects have their dedicated git repos.
As lib-c will always be included in vue application, I have specified lib-c under rollupOptions.external of lib-a to exclude it from the build of lib-a.
Now the problem which I am facing is that no matter what settings I use for build.watch and rollupOptions.watch options in the vite.config.js file of lib-a, vite is simply not watching local linked dependency lib-c when some code is changed in it and when yarn build --watch command is running on lib-a. Is this a limitation of vite/rollup or am I missing something? If it is a limitation, is it possible to achieve this using some vite plugin? Also if this is a limitation then what is the reason behind this behavior because, IMO, a local linked dependency should always be watched irrespective of it being marked as external or not?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a vue application which is having dependency on two local dependencies - lib-a and lib-c. lib-a is also having dependency on lib-c. So the dependency graph look as follows -
We are using vite lib mode for building both
lib-a
andlib-c
but none of these are having any vue components. We are also using local linking for both the libs inpackage.json
files of both vue andlib-a
projects. All three projects have their dedicated git repos.As
lib-c
will always be included in vue application, I have specifiedlib-c
underrollupOptions.external
oflib-a
to exclude it from the build oflib-a
.Now the problem which I am facing is that no matter what settings I use for
build.watch
androllupOptions.watch
options in thevite.config.js
file oflib-a
, vite is simply not watching local linked dependencylib-c
when some code is changed in it and whenyarn build --watch
command is running onlib-a
. Is this a limitation of vite/rollup or am I missing something? If it is a limitation, is it possible to achieve this using some vite plugin? Also if this is a limitation then what is the reason behind this behavior because, IMO, a local linked dependency should always be watched irrespective of it being marked as external or not?Beta Was this translation helpful? Give feedback.
All reactions