title: How to setup SWC compiler
body: <p>I'm using <a href="https://swc.rs" rel="nofollow noreferrer">SWC</a> for the first time and I'm not able to compile my ts files into normal js files.</p>
  <p>When I run my command :</p>
  <pre><code>npx swc ./src -d dist
  </code></pre>
  <p>I got the error :</p>
  <pre><code>failed to process js file
  
  Caused by:
      0: failed to read swcrc file (src/index.ts)
      1: failed to deserialize .swcrc (json) file: syntax error: 1:1
      2: expected value at line 1 column 1
  </code></pre>
  <p>Here is my.swcrc I have generated with the <a href="https://swc.rs/playground" rel="nofollow noreferrer">SWC Playground</a></p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;jsc&quot;: {
      &quot;parser&quot;: {
        &quot;syntax&quot;: &quot;typescript&quot;,
        &quot;tsx&quot;: false
      },
      &quot;loose&quot;: false,
      &quot;minify&quot;: {
        &quot;compress&quot;: false,
        &quot;mangle&quot;: false
      }
    },
    &quot;module&quot;: {
      &quot;type&quot;: &quot;commonjs&quot;
    },
    &quot;minify&quot;: false,
    &quot;isModule&quot;: true,
    &quot;sourceMaps&quot;: &quot;inline&quot;
  }
  
  </code></pre>
  <p>My goal is to :</p>
  <ul>
  <li>Take my ts files from my <code>./src</code> dir</li>
  <li>Compile and output it in a <code>dist</code> dir with source maps enabled</li>
  </ul>