Properly resolve alias paths in vite (#374)
The dev mode couldn't be loaded in Firefox
This commit is contained in:
@@ -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()],
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user