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

Ignore node_modules/ when running import.meta.glob #1974

Closed
3 tasks done
brillout opened this issue Feb 11, 2021 · 0 comments
Closed
3 tasks done

Ignore node_modules/ when running import.meta.glob #1974

brillout opened this issue Feb 11, 2021 · 0 comments

Comments

@brillout
Copy link
Contributor

  • Read the docs.
  • Use Vite >=2.0. (1.x is no longer supported)
  • If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.

Describe the bug

import.meta.glob also searches inside node_modules/.

Reproduction

I had a quick look at Vite's source code and this bug seems to always occur:

const files = glob.sync(pattern, { cwd: base })

It doesn't seem like node_modules/ is being set to be ignored, and by default fast-glob doesn't seem to ignore node_modules/.

System Info

  • vite version: 2.0.0-beta.67
  • Operating System: Linux
  • Node version: 15.3.0
  • Package manager (npm/yarn/pnpm) and version: npm 7.0.14

Logs (Optional if provided reproduction)

N/A

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
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