mastilver / module-to-cdn

MIT License
45 stars 32 forks source link

Add more modules #6

Open mastilver opened 7 years ago

mastilver commented 7 years ago
swyxio commented 6 years ago

hey mastilver - seems you arent maintaining this anymore - just wondering what your thoughts are? is it not useful enough?

mastilver commented 6 years ago

Hi @sw-yx :wave:

I saw your slides, really cool :+1: I'm still maintaining it, I just took a few months away from open-source I'll slowly going through my notifications to address all the raised issue / opened PRs In the meantime, feel free to send me a PR to add modules :)

swyxio commented 6 years ago

hey thanks for the reply!! I was just thinking, maybe theres a way to define a default rule for module-to-cdn to map for any arbitrary library. I don't really like this whitelisting approach because it doesn't scale. since you can define modules to exclude/include in dynamic-cdn-webpack-plugin anyway, there's no real downside.

as a further extra step, we could build in some sort of "ping" to validate the module-to-cdn result during the web pack build process. it would slow down the build but then guarantee that this autogenerated module-to-cdn mapping is valid for a particular library and version.

what do you think?

mastilver commented 6 years ago

maybe theres a way to define a default rule for module-to-cdn to map for any arbitrary library.

I wish that was possible... but not everybody is using the same pattern If you find another solution, that would be awesome :)

we could build in some sort of "ping" to validate the module-to-cdn result during the web pack build process

Can you explain that, I didn't get it... If library is not valid module-to-cdn should return null Also I planning to create a module-to-cdnjs that will return a Promise (It will needs the make a api calls to check if the lib is there as a new version is available after a new version is published - do I make sense?)

mastilver commented 6 years ago

We could use https://packd.now.sh/ but I'm not sure if it's out of beta yet

swyxio commented 6 years ago

not sure. im not going to work on this right now as I don't have much better ideas. but I think its a really good idea that I will probably come back to in future.