promo! react

This commit is contained in:
Zakhar 2026-08-28 09:47:06 +03:00
parent 8526e66f5c
commit 037681b463

View File

@ -2,21 +2,23 @@ import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import fs from 'node:fs';
export default defineConfig({
export default defineConfig(({mode}) => ({
plugins: [react()],
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',
},
...(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',
},
});
}));