<p dir="auto">Any use of =&gt; in a script inside an HTML file produces an error and says you have to set target:ES6 in jsconfig.json. But doing so does not make the error go away - it only applies to .js files</p>
<p dir="auto">I use Vue and webpack to build my webapp, which allows me to write a web component  like this:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;style&gt;
 /*the component's css goes here*/
&lt;/style&gt;
&lt;template&gt;
  &lt;!-- the component's html goes here--&gt;
  &lt;div&gt;&lt;/div&gt;
&lt;/template&gt;
&lt;script&gt;
  // the component's js goes here
  import Xx from 'xx'
  let xx = new Xx()
  xx(yy =&gt; {
    return 'Have a nice day'
  })
&lt;/script&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">style</span><span class="pl-kos">&gt;</span>
 <span class="pl-c">/*the component's css goes here*/</span>
<span class="pl-kos">&lt;/</span><span class="pl-ent">style</span><span class="pl-kos">&gt;</span>
<span class="pl-kos">&lt;</span><span class="pl-ent">template</span><span class="pl-kos">&gt;</span>
  <span class="pl-c">&lt;!-- the component's html goes here--&gt;</span>
  <span class="pl-kos">&lt;</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span>
<span class="pl-kos">&lt;/</span><span class="pl-ent">template</span><span class="pl-kos">&gt;</span>
<span class="pl-kos">&lt;</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span>
  <span class="pl-c">// the component's js goes here</span>
  <span class="pl-k">import</span> <span class="pl-v">Xx</span> <span class="pl-k">from</span> <span class="pl-s">'xx'</span>
  <span class="pl-k">let</span> <span class="pl-s1">xx</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Xx</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
  <span class="pl-s1">xx</span><span class="pl-kos">(</span><span class="pl-s1">yy</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-k">return</span> <span class="pl-s">'Have a nice day'</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-kos">&lt;/</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span></pre></div>
<p dir="auto">but, the problem is even I created a jsconfig.json file which sets the target to ES6. It just didn't work.</p>