<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong><br>
When the value of an enum case references a string case on another enum an unexpected extra key is added to the compiled javascript object. This is especially apparent when the case names do not match.</p>
<p dir="auto"><strong>Input Code</strong><br>
<a href="https://bit.ly/2nRTcds" rel="nofollow">https://bit.ly/2nRTcds</a></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="enum Foo {
  foo = &quot;foo&quot;
}

enum Baz {
  baz = Foo.foo
}"><pre class="notranslate"><span class="pl-k">enum</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span>
  <span class="pl-c1">foo</span> <span class="pl-c1">=</span> <span class="pl-s">"foo"</span>
<span class="pl-kos">}</span>

<span class="pl-k">enum</span> <span class="pl-smi">Baz</span> <span class="pl-kos">{</span>
  <span class="pl-c1">baz</span> <span class="pl-c1">=</span> <span class="pl-smi">Foo</span><span class="pl-kos">.</span><span class="pl-c1">foo</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Expected behavior/code</strong><br>
With the code above, I would expect a javascript object that contained one key, "baz", with the value "foo". Instead, "Baz" has two keys, "baz", "foo", with the values, "foo" and "baz" respectively. This does not match what the Typescript compiler produces: <a href="https://bit.ly/2nbliQX" rel="nofollow">https://bit.ly/2nbliQX</a></p>
<p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong></p>
<p dir="auto">No special configuration. See the babel REPL link above for the full configuration.</p>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s): v7.6.2</li>
<li>Node/npm version: NA</li>
<li>OS: NA</li>
<li>Monorepo: no</li>
<li>How you are using Babel: repl</li>
</ul>
<p dir="auto">I was looking through the Babel docs, and I don't see a way to specify a different file other than .babelrc for the Babel config.</p>
<p dir="auto">My use case is I am writing a test runner. A project might use Babel in more than one way. For example, they may transpile their source with some Babel settings, but may transpile their tests with another Babel setting.</p>
<p dir="auto">So ideally, what I would have in the project root, would be:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="project-root/
  .babelrc          // used by project source 
   suman.babelrc     // used for transpiling tests"><pre class="notranslate"><code class="notranslate">project-root/
  .babelrc          // used by project source 
   suman.babelrc     // used for transpiling tests
</code></pre></div>
<p dir="auto">my thinking is that when I use babel-cli, I could pass the path to suman.babelrc to babel via the command line, or an env variable, either one.</p>
<p dir="auto">Is this supported yet? Like I said, had trouble finding out if this is supported. Thanks!</p>