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 the path to type definitions in ImportMeta #8360

Closed
wants to merge 1 commit into from

Conversation

yuheiy
Copy link

@yuheiy yuheiy commented Sep 1, 2023

Changes

Fixed the path for type definitions for import.meta.glob and import.meta.globEager. This is because Vite no longer exposes vite/types/importGlob and vite/types/importGlob, and it needs to be imported from vite instead.

Testing

Verified the type definitions for import.meta.glob and import.meta.globEager in files that import import-meta.d.ts.

Docs

No additional documentation is required to detail the implementation.

Vite no longer expose `vite/types/importGlob` and `vite/types/importGlob`
@changeset-bot
Copy link

changeset-bot bot commented Sep 1, 2023

🦋 Changeset detected

Latest commit: 07be5f0

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Sep 1, 2023
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this change is fine, presumably it doesn't work because vite/types/* isn't exported from Vite's package.json ``"exports'`? I think it could be fixed upstream.

There's also line 12 hitting this problem, but it's not exported from "vite" index.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I open the PR for Vite. vitejs/vite#14296

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants