forked from FixMyBerlin/atlas-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
30 lines (29 loc) · 1004 Bytes
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { defineConfig } from 'vite'
import svgr from 'vite-plugin-svgr'
import react from '@vitejs/plugin-react'
import path from 'path'
// https://vitejs.dev/config/
/** @type {import('vite').UserConfig} */
export default defineConfig({
resolve: {
alias: {
'@components': path.resolve(__dirname, './src/components/'),
'@pages': path.resolve(__dirname, './src/pages/'),
'@routes': path.resolve(__dirname, './src/routes/'),
'@assets': path.resolve(__dirname, './src/assets/'),
'@fakeServer': path.resolve(__dirname, './src/fakeServer/'),
'@api': path.resolve(__dirname, './src/api/'),
},
},
// https://github.com/pd4d10/vite-plugin-svgr
plugins: [react(), svgr()],
build: {
sourcemap: true,
},
server: {
host: '127.0.0.1', // `localhost` fails with OSM OAuth, so we force the IP
port: 5173, // Whitelisted in atlas-geo, so we need this one
strictPort: true, // Exit if 5173 is unavaliable
// open: '/docs/index.html',
},
})