-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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(prefetch): Fix the inclusion of @types/network-information
#7123
Conversation
🦋 Changeset detectedLatest commit: 907990f 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 |
Hi, thanks for catching this. I didn't expect the types file to be imported, and it doesn't seem right that it's imported by a JS file. I think instead we can remove the import here:
and add this to the top of the file instead. /// <reference types="../@types/network-information.d.ts" /> |
@bluwy That makes sense! I've changed the approach as suggested. |
@types/network-information
Are releases automated/on a schedule? Downgrading for now. |
I've cut a new release to fix it. |
Changes
#7104 added the
"files"
field to all packages to limit the files that are published to npm. The@astro/prefetch
package only includes thedist
folder, however, the code tries to import from the@types
folder, causing the following error:I added the@types
folder to the"files"
field to fix it.I changed the import to a triple-slash directive as suggested by @bluwy.
Testing
I did not test the change as it seems straightforward.
Docs
This fixes an expected behavior, so an update to the docs doesn't seem necessary.