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
(by the way, I don't actually have these isEven and getRemainder functions :)).
Now, what happens is that when I run vitest on App.test.js, it resolves App just fine using the alias, but it can't resolve getRemainder, as it is apparently looking in packages/app/ for it.
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 want
~
to refer to different package roots in a monorepo, depending on which file it is in. Here are the details:I have a yarn monorepo with a structure similar to this example:
vitest.workspace.json
looks like this:[ "packages/*/vitest.config.js" ]
Both
vitest.config.js
files look like this:I am using parcel, which allows me to import relative to the nearest package root using
~/src/
.App.test.js
:App.js
:packages/shared/src/index.js
:isEven.js
:getRemainder.js
:(by the way, I don't actually have these
isEven
andgetRemainder
functions :)).Now, what happens is that when I run vitest on
App.test.js
, it resolvesApp
just fine using the alias, but it can't resolvegetRemainder
, as it is apparently looking inpackages/app/
for it.Beta Was this translation helpful? Give feedback.
All reactions