Add resolver to vite.config.js

This commit is contained in:
Mathias Wagner 2025-02-16 21:36:56 +01:00
parent 9e9ba8efbb
commit 9b21cfee40
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44
2 changed files with 24 additions and 4 deletions

8
jsconfig.json Normal file
View File

@ -0,0 +1,8 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}

View File

@ -1,7 +1,19 @@
import { defineConfig } from 'vite' import {defineConfig} from "vite";
import react from '@vitejs/plugin-react' import react from "@vitejs/plugin-react";
import path from "path";
// https://vite.dev/config/
export default defineConfig({ export default defineConfig({
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler',
},
},
},
resolve: {
alias: {
"@": path.resolve(__dirname, "src"),
}
},
plugins: [react()], plugins: [react()],
}) })