title: Vite: resolve.alias - how to resolve paths?
body: <p>What can <a href="https://vitejs.dev/config/#resolve-alias" rel="noreferrer">resolve.alias</a> do? It doesn't resolve the path below:</p>
  <pre><code>// vite.config.js
  import { defineConfig } from 'vite'
  import path from 'path'
  
  export default defineConfig({
    resolve: {
      alias: {
        '@': path.resolve(__dirname, '/src'),
      },
    }
  })
  </code></pre>
  <p>In my HTML:</p>
  <pre><code>&lt;img src=&quot;@/assets/images/sample-1.jpg&quot;&gt;
  </code></pre>
  <p>Error in the browser Console:</p>
  <pre><code>GET http://localhost:3000/@/assets/images/sample-1.jpg 
  Failed to load resource: the server responded with a status of 404 (Not Found)
  client:180 [vite] connecting...
  client:202 [vite] connected.
  </code></pre>
  <p>Any ideas how to do it correctly?</p>