title: Absolute path not working in Vite project React TS
body: <p>I'm struggling to get absolute path to work in a <strong>Vite react-ts</strong> project.</p>
  <p>Here's how I created the project</p>
  <pre><code>npm init @vitejs/app
  npx: installed 6 in 1.883s
  √ Project name: ... test-vite
  √ Select a framework: » react
  √ Select a variant: » react-ts
  </code></pre>
  <p>Then I added <strong>baseUrl</strong> to <strong>tsconfig.json</strong>
  based on the <a href="https://www.typescriptlang.org/tsconfig#baseUrl" rel="noreferrer">TS official doc</a>:</p>
  <pre><code>{
    &quot;compilerOptions&quot;: {
      &quot;baseUrl&quot;: &quot;./src&quot;,
      ...
  </code></pre>
  <p>followed by adding a simple component (T:\test-vite\src\components\Test.tsx)</p>
  <pre><code>import React from &quot;react&quot;;
  
  const Test = () =&gt; &lt;h1&gt;This is a Test.&lt;/h1&gt;;
  
  export default Test;
  </code></pre>
  <p>Finally I import the <strong>Test</strong> component in <strong>App.tsx</strong><br/>
  but it won't let me use absolute path:</p>
  <pre><code>import Test from &quot;components/Test&quot;;
  </code></pre>
  <p>I get this error
  <a href="https://i.stack.imgur.com/FRg69.png" rel="noreferrer"><img src="https://i.stack.imgur.com/FRg69.png" alt="enter image description here" /></a></p>
  <p>whereas if I use relative path, the app works in <strong>dev</strong> &amp; <strong>build</strong> mode without any error:</p>
  <pre><code>import Test from &quot;./components/Test&quot;;
  </code></pre>
  <p>How can I make absolute path work in the project?</p>