title: How to disable file extension (".js") need for import/export in an ES6 project?
body: <p>I have a ts module. I'm compiling this module to another project's specific folder by using &quot;outDir&quot; of tsconfig.json and the command &quot;tsc -w&quot;. So, every time when I update the ts module it compiles files to the other project but forgetting file extensions while importing. And that means I have to manually update all extensions each time because it is a must in ES6.</p>
  <p>I searched if there's a way to compile ts files with file extensions but found nothing.
  And I searched to disable file extension (&quot;.js&quot;) need for import/export in an ES6 project. Then I found <a href="https://stackoverflow.com/a/44510307/10908886">this</a>:</p>
  <blockquote>
  <p>...configure your server to ignore the extension...</p>
  </blockquote>
  <p>But he is not saying how to configure.</p>
  <p>Edit:</p>
  <p>I am running my project with <code>nodemon src/index.js</code></p>
  <p>and when a js file generated which has an import without extension this is the error nodemon gave:</p>
  <pre><code>[nodemon] restarting due to changes...
  [nodemon] starting `node src/index.js`
  internal/process/esm_loader.js:74
      internalBinding('errors').triggerUncaughtException(
                                ^
  
  Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\Users\......\trendyol' imported from C:\Users\.......\index.js
      at finalizeResolution (internal/modules/esm/resolve.js:276:11)
      at moduleResolve (internal/modules/esm/resolve.js:699:10)
      at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:810:11)
      at Loader.resolve (internal/modules/esm/loader.js:86:40)
      at Loader.getModuleJob (internal/modules/esm/loader.js:230:28)
      at ModuleWrap.&lt;anonymous&gt; (internal/modules/esm/module_job.js:56:40)
      at link (internal/modules/esm/module_job.js:55:36) {
    code: 'ERR_MODULE_NOT_FOUND'
  }
  [nodemon] app crashed - waiting for file changes before starting...
  </code></pre>
  <p>But when I add extensions (&quot;js&quot;), it works as expected.</p>