24 lines
615 B
TypeScript
24 lines
615 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import fs from 'node:fs';
|
|
|
|
export default defineConfig(({mode}) => ({
|
|
plugins: [react()],
|
|
...(mode != 'production' && {
|
|
server: {
|
|
host: 'local.hvatilo.ru',
|
|
port: 9876,
|
|
https: {
|
|
cert: fs.readFileSync('local.hvatilo.ru.pem'),
|
|
key: fs.readFileSync('local.hvatilo.ru-key.pem'),
|
|
},
|
|
open: '/src/template.html',
|
|
}
|
|
}),
|
|
input: {
|
|
main: './src/template.html',
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
},
|
|
})); |