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

Invalid glob import syntax: Expect CallExpression, got MemberExpression #9237

Closed
7 tasks done
eightHundreds opened this issue Jul 20, 2022 · 0 comments · Fixed by #9281
Closed
7 tasks done

Invalid glob import syntax: Expect CallExpression, got MemberExpression #9237

eightHundreds opened this issue Jul 20, 2022 · 0 comments · Fixed by #9281

Comments

@eightHundreds
Copy link

Describe the bug

this is work

const tmp =import.meta.glob('./reducers/index.ts', { eager: true });
console.log(tmp['./reducers/index.ts']);

this is no work

import.meta.glob('./reducers/index.ts', { eager: true })['./reducers/index.ts']

Reproduction

https://stackblitz.com/edit/vitejs-vite-fkrxyb?file=main.js

System Info

System:
    OS: macOS 12.4
    CPU: (8) x64 Apple M1
    Memory: 30.66 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 14.19.2 - /var/folders/sk/rbbm3xcj431ch42x9vrsy5p00000gn/T/fnm_multishells/76684_1658288502063/bin/node
    Yarn: 1.22.18 - /var/folders/sk/rbbm3xcj431ch42x9vrsy5p00000gn/T/fnm_multishells/76684_1658288502063/bin/yarn
    npm: 6.14.17 - /var/folders/sk/rbbm3xcj431ch42x9vrsy5p00000gn/T/fnm_multishells/76684_1658288502063/bin/npm
    Watchman: 2021.09.13.00 - /usr/local/bin/watchman
  Browsers:
    Firefox: 102.0.1
    Safari: 15.5
    Safari Technology Preview: 15.4
  npmPackages:
    @vitejs/plugin-react: ^1.1.4 => 1.1.4 
    vite: ^3.0.2 => 3.0.2

Used Package Manager

npm

Logs

No response

Validations

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

Successfully merging a pull request may close this issue.

1 participant