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

fix: allow importing relative paths in global resources #548

Merged
merged 1 commit into from Sep 6, 2023

Conversation

pmrotule
Copy link
Contributor

It seems like the fix I've made for relative paths in global resources in vue2-jest v26 (#373) has not been ported to the other versions (not in v27, v28, v29). We recently upgraded to v29 and faced the same issue so this PR is making the same changes, but for v29 in both Vue 2 and Vue 3 (I tested it and it works as expected).

More details found in my previous PR: #373

@pmrotule
Copy link
Contributor Author

pmrotule commented Sep 6, 2023

@lmiller1990 Would you have time to have a look?

@lmiller1990
Copy link
Member

Will release this one now.

@lmiller1990 lmiller1990 merged commit b0c843a into vuejs:master Sep 6, 2023
3 of 4 checks passed
@lmiller1990
Copy link
Member

Done: https://github.com/vuejs/vue-jest/releases/tag/v29.2.6

@pmrotule pmrotule deleted the fix/global-resources-scss-v29 branch September 8, 2023 17:30
@remcobeunk
Copy link

@pmrotule it seems this fix is breaking our unit test run with the error you originally fixed in this pr: #373.

On Mac it works but on Windows machines it does not.

Error: Can't find stylesheet to import.

1 │ @import "XXXX path = correct and file exists";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

After reverting your change locally our vue2 tests start working again:
image

Any ideas?

@pmrotule
Copy link
Contributor Author

pmrotule commented Oct 2, 2023

@remcobeunk I would need more information to debug.

  • Which CSS preprocessor do you use?
  • How does your global ressources config look like?

Can you provide a reproduction repo or stackblitz?

@remcobeunk
Copy link

Our project uses SASS CSS pre-processor
Global resources config? No idea which config you want, jest specifically or all configs?
But because project is end of live we are not going to invest more time into this problem.

We set our project fixed to version of 29.2.5 that works for all of our developers.
Sorry I cannot help you more with this.

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

3 participants