0

In vite react project, adding alias for src as @ does not populate auto recommendations while importing.

    import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import * as path from 'path';

// https://vitejs.dev/config/
export default defineConfig({
  resolve: {
    alias: [{ find: '@', replacement: path.resolve(__dirname, 'src') }],
  },
  plugins: [react()]
});
Sanket Patil
  • 807
  • 1
  • 11
  • 19
  • you might want to search around here on S.O., there are questions about the same topic. E.g. [this](https://stackoverflow.com/questions/73495629/how-to-use-intellisense-with-at-symbol-in-vite) or [this](https://stackoverflow.com/a/64511851/540776) look relevant. In case, you might also want to close this question. HTH – superjos Mar 06 '23 at 17:30

0 Answers0