Is it possible to import modules into a Polymer component?
<p>I would like to keep my polymer components nicely encapsulated but right now if I try to import any external modules into the components I get an undefined error for 'import'.</p>

<p>I use Webpack to bundle up my app but this packs up my javascript files  only.</p>

<p>Is there a way to do keep my Polymer component encapsulated into a single html file or I must separate the js part when it comes to imports?</p>

<p>Example:</p>

<pre><code>&lt;link rel="import" href="../bower_components/polymer/polymer.html"&gt;

&lt;dom-module id="my-new-view"&gt;
  &lt;template&gt;
    &lt;style&gt;
    &lt;/style&gt;

    &lt;h1&gt;New view&lt;/h1&gt;
  &lt;/template&gt;

  &lt;script&gt;

   import { myConstant } from '../module.js'; //&lt;---- this throws error for the import'

    Polymer({
      is: 'my-new-view'
    });
  &lt;/script&gt;
&lt;/dom-module&gt;
</code></pre>