9

In my case it's a code example in an answer to this question. I'm relying on a third-party CDN to import libraries from NPM that would otherwise be tricky to use in the Stack Overflow code-snippet editor.

I'm doing this in preference to (for instance) adding a link to an example in online REPL/IDE that has better support for NPM packages.

...but effectively, both are external dependencies to my answer that could break at any time (as, I suppose, is NPM itself, although I feel safer in my assumption that we're stuck with it for a while longer).

What's the preference here?

1
  • 5
    This raises a good question about all the snippets that use the now dead rawgit service. Don't know how much this represent nor what to do with it, but having SO doing the proxy like they do with images would be great.
    – Kaiido
    Commented May 16, 2019 at 23:36

1 Answer 1

8

In this particular case, AFAICS, you are using an official release of a publicly available library.

So this is no different than if you said: "You can do this using library X: <code>".

Since the URL is human-readable, even if the link rots, a reader would still see which library (and version) you meant and could get it from elsewhere, or use a later version or whatever.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .