-
-
Notifications
You must be signed in to change notification settings - Fork 302
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
include unpkg (or main) when caching #157
Conversation
attempt to resolve mjackson#156 disclaimer: 🚒 this patch is 100% untested! 🚒
modules/utils/getNpmPackageInfo.js
Outdated
@@ -7,6 +7,7 @@ function cleanPackageConfig(packageConfig) { | |||
return { | |||
name: packageConfig.name, | |||
version: packageConfig.version, | |||
main: packageConfig.unpkg || packageConfig.main, |
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.
Good idea! (if this is what caused the issue, 😄 I haven't tested either!)
there's already quite a bit of logic in filenameRedirect about these things. I think it might be better to directly map packageConfig.main
, packageConfig.module
, packageConfig.browser
, packageConfig.unpkg
to this object
modules/utils/getNpmPackageInfo.js
Outdated
unpkg: packageConfig.unpkg, | ||
main: packageConfig.main, | ||
module: packageConfig.module, | ||
"js:next": packageConfig["js:next"], |
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 awesome, great catch on adding the js:next
as well. I'd anticipate having to replace the double quotes with single quotes, though; it looks like there was recently a big refactor
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.
good catch. addressed in 0d5f0dc
How has this patch for a breaking bug not been pulled yet? Does mjackson not realize his website is broken? |
this is far from a showstopper. if you need the problem fixed immediately, update your own links to reference the explicit files you need to load. |
It breaks a feature that has been advertised and known to work until now. Now that you mention updating reference links, if I had still depended on this feature for some of my projects, there would have been no way for me to get people to update other than bothering them by word of mouth to reinstall it manually. Luckily I have a separate file for version detection, but I still believe it wont download the file correctly until this bug is fixed. But this is my own fault for depending on 3rd party features rather than pointing directly to the files. Luckily |
|
attempt to resolve #156