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

Vitest v0.32.0 cannot find some module #3586

Closed
6 tasks done
nakamurakjr opened this issue Jun 16, 2023 · 1 comment
Closed
6 tasks done

Vitest v0.32.0 cannot find some module #3586

nakamurakjr opened this issue Jun 16, 2023 · 1 comment

Comments

@nakamurakjr
Copy link

Describe the bug

After updating vitest from v0.31.4 to v0.32.0, import of some files fails.
Error: Cannot find module '*.svg?.tsx'

I created my own plug-in (reactSvgr), imported SVG files with an extension like * .svg?.tsx, and used it as a React component.
In the latest vitest, it stopped working, probably because they didn't apply the plugin.

This seems to be a regression of the change made from this pull request: #3307.
While I believe that change was necessary, I am currently facing difficulties due to this regression.

Reproduction

https://github.com/kazuma1989/vitest-issue-3307

System Info

System:
    OS: macOS 12.6.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 5.53 GB / 64.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.15.0 - ~/.nodebrew/current/bin/node
    Yarn: 1.22.19 - ~/.nodebrew/current/bin/yarn
    npm: 9.5.0 - ~/.nodebrew/current/bin/npm
  Browsers:
    Chrome: 114.0.5735.133
    Safari: 15.6.1

Used Package Manager

npm

Validations

@nakamurakjr nakamurakjr changed the title Vitest cannot find module Vitest cannot find some module Jun 16, 2023
@nakamurakjr nakamurakjr changed the title Vitest cannot find some module Vitest v0.32.0 cannot find some module Jun 16, 2023
@nakamurakjr
Copy link
Author

nakamurakjr commented Jun 19, 2023

The bug I described has been fixed by following PR, and changes have been released.
#3544

https://github.com/vitest-dev/vitest/releases/tag/v0.32.1

@github-actions github-actions bot locked and limited conversation to collaborators Jul 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant