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

Re-run cannot be triggered by files imported by import.meta.glob with raw #2919

Closed
6 tasks done
sxzz opened this issue Feb 25, 2023 · 0 comments · Fixed by #4130
Closed
6 tasks done

Re-run cannot be triggered by files imported by import.meta.glob with raw #2919

sxzz opened this issue Feb 25, 2023 · 0 comments · Fixed by #4130

Comments

@sxzz
Copy link
Contributor

sxzz commented Feb 25, 2023

Describe the bug

Consider the code below

const results = import.meta.glob('./*.txt', {
  as: 'raw', 
  eager: true,
})
console.log(results)

It will not re-run after changing foo.txt. But if removes as: 'raw' it just works.

Reproduction

https://github.com/sxzz/vitest-glob-test

nr test and modify tests/a.txt

System Info

System:
    OS: macOS 13.2.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 3.63 GB / 32.00 GB
    Shell: 3.6.0 - /opt/homebrew/bin/fish
  Binaries:
    Node: 18.14.0 - ~/Library/Caches/fnm_multishells/18655_1677326277920/bin/node
    Yarn: 1.22.19 - ~/Library/pnpm/yarn
    npm: 9.3.1 - ~/Library/Caches/fnm_multishells/18655_1677326277920/bin/npm
  Browsers:
    Chrome: 110.0.5481.177
    Chrome Canary: 113.0.5616.0
    Firefox: 109.0
    Safari: 16.3
    Safari Technology Preview: 16.4
  npmPackages:
    vite: ^4.1.4 => 4.1.4 
    vitest: ^0.29.1 => 0.29.1

Used Package Manager

pnpm

Validations

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

Successfully merging a pull request may close this issue.

2 participants