29 lines
704 B
TypeScript
29 lines
704 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import basicSsl from '@vitejs/plugin-basic-ssl'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
basicSsl({
|
|
/** name of certification */
|
|
name: 'test',
|
|
/** custom trust domains */
|
|
domains: ['*.localhost', '127.0.0.1'],
|
|
/** custom certification directory */
|
|
// certDir: '/Users/.../.devServer/cert'
|
|
})
|
|
],
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'https://subtitle-dev.felo.me/api',
|
|
changeOrigin: true,
|
|
secure: true,
|
|
rewrite: (requestPath: string) => requestPath.replace('/api', ''),
|
|
},
|
|
}
|
|
}
|
|
})
|