-
Notifications
You must be signed in to change notification settings - Fork 915
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
[esinstall] add type-only package handling #1133
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/pikapkg/snowpack/fej2ptglz |
2041342
to
dd44086
Compare
| { | ||
type: 'DTS'; | ||
loc: undefined; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
importMap.imports[installSpecifier] = `./${proxiedName}`; | ||
} else if (resolvedResult.type === 'DTS') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻 This is clean!
importMap.imports[installSpecifier] = `./${proxiedName}`; | ||
} else if (resolvedResult.type === 'DTS') { | ||
// This is fine! Skip type-only packages | ||
logger.debug(`[${installSpecifier}] target points to a TS-only package.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
@@ -11298,19 +11298,61 @@ const foo = 'bar'; | |||
export { foo };" | |||
`; | |||
|
|||
exports[`snowpack install dep-types-only: allFiles 1`] = ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! This is much needed
Changes
Testing