Adding dependencies with just the browser

Every time I mention an external library, you will search for the relative .js file on the Internet, preferably distributed by a CDN, and add it to the left menu of JSFiddle. Let's try with moment.js.

  1. Open a new JSFiddle (point your browser to https://jsfiddle.net/).
  2. In another tab, search for momentjs CDN in your favorite search engine.
  3. The first result should lead you to a CDN website with a list of links; you should eventually find something like https://somecdn.com/moment.js/X.X.X/moment.js where the X represents the version number.
  4. Copy the link you found and go back to JSFiddle.
  5. In the External Resources section in the left sidebar, paste your link and press Enter.

For many libraries this ...

Get Vue.js 2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.