title: Importing distant modules in javascript from unpkg
body: <p>I’m trying to import whole modules in a javascript file.</p>
  <p>This file pertains to the Home Assistant environment where the frontend is written in javascript, usually using LitElements and modules (cf. <a href="https://developers.home-assistant.io/docs/frontend/custom-ui/lovelace-custom-card/" rel="nofollow noreferrer">documentation</a>).</p>
  <p>For instance, the doc uses a fancy <code>wired-card</code> by writing:</p>
  <pre><code>import &quot;https://unpkg.com/wired-card@0.8.1/wired-card.js?module&quot;;.
  </code></pre>
  <p>I've read a lot about the <code>import</code> call but resources are usually about local elements and it seems that I need them to be distant.</p>
  <p>In fact, I know the plain old JS quite well but I am a bit clueless regarding importing modules (and LitElements for that matter).</p>
  <p>For instance, I'm looking for an accordion (expansion panel), like <a href="https://jqueryui.com/accordion/" rel="nofollow noreferrer">the one of JQueryUI</a>. I found several resources (e.g. <a href="https://github.com/IvanSkokovskyi/lit-element-accordion" rel="nofollow noreferrer">here</a>, <a href="https://unpkg.com/browse/carbon-components@10.25.0/" rel="nofollow noreferrer">here</a>, or <a href="https://unpkg.com/browse/angular-material-expansion-panel@0.7.2/" rel="nofollow noreferrer">here</a>) but I couldn't find how to import them easily.</p>
  <p>What makes a module importable? Are those not or am I doing it wrong?</p>