From ef20900793475bf73c9720689e92cdf610415d7a Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Mon, 12 Sep 2022 00:55:33 +0200 Subject: [PATCH] Added the alias resolver to the vite config --- vite.config.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/vite.config.js b/vite.config.js index eca6e2f..b131de8 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,6 +1,12 @@ -import { defineConfig } from 'vite' +import {defineConfig} from 'vite' +import path from "path"; import react from '@vitejs/plugin-react' export default defineConfig({ - plugins: [react()] + plugins: [react()], + resolve: { + alias: { + '@': path.resolve(__dirname, './src'), + }, + }, })