observablehq / feedback

Customer submitted bugs and feature requests
42 stars 3 forks source link

Make the process of adding third party libs more streamlined for new users #386

Open lukesmurray opened 2 years ago

lukesmurray commented 2 years ago

Is your feature request related to a problem? Please describe.

It is usually possible to add third party libraries to observable but the default method proposed in snippets often fails.

image

Describe the solution you'd like

You already have a solution on observable but I can't imagine it would be easy to find for new users.

Describe alternatives you've considered

If I were a new user to observable and tried installing a third party library and it didn't work I might just give up. As an example I tried installing @gaearon/lag-radar but accidentally typed require(lag-radar). While the module-require-debugger I linked above says this package is not published on npm the default require just fails with a cryptic error message. When I tried require(@gaeron/lag-radar) I got another error message. At that point I would probably give up but it turns out you can require @gaeron/lag-radar using skypack. import('https://cdn.skypack.dev/@gaearon/lag-radar@0.1.0?min'). Would be amazing if some of this could be simplified for users since JS developers rely heavily on third party libs for almost everything.

CobusT commented 2 years ago

Thanks for this suggestion!

abitrolly commented 1 year ago

176 is related.