Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow use in workspaces #7

Merged
merged 3 commits into from Jul 13, 2021
Merged

Conversation

maxbeatty
Copy link
Contributor

previously, vite-jest assumed process.cwd() would contain node_modules
in workspace environments, a parent directory may contain node_modules
now, vite-jest will work in either setup


my project setup looks like:

  • package.json
  • node_modules
  • workspace-a
    • package.json

if workspace-a/package.json had a test script vite-jest and was run from the root (i.e. npm run test --workspace workspace-a), it would attempt to write to workspace-a/node_modules/vite/dist/client which did not exist. now, it will correctly write to node_modules/vite/dist/client even though process.cwd() is workspace-a.

previously, vite-jest assumed process.cwd() would contain node_modules
in workspace environments, a parent directory may contain node_modules
now, vite-jest will work in either setup
@maxbeatty
Copy link
Contributor Author

it appears vitejs/vite#4061 was included in vite@2.4.0 so maybe the PR here is to remove those lines entirely?

Max Beatty added 2 commits July 12, 2021 14:12
fixed in vitejs/vite#4061 and released v2.4.0
changed in vitejs/vite#4061 and released in v2.4.0
Copy link
Owner

@sodatea sodatea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was about to do the same after 2.4 release. Thanks!

@sodatea sodatea merged commit 383d571 into sodatea:main Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants