Properly resolve alias paths in vite (#374)

The dev mode couldn't be loaded in Firefox
This commit is contained in:
schroda
2023-06-17 20:53:00 +02:00
committed by GitHub
parent 4dcf6a3ad9
commit cc423932b0

View File

@@ -9,6 +9,7 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import viteTsconfigPaths from 'vite-tsconfig-paths';
import path from 'path';
export default defineConfig(() => ({
build: {
@@ -17,5 +18,10 @@ export default defineConfig(() => ({
server: {
port: 3000,
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
plugins: [react(), viteTsconfigPaths()],
}));