promo! react

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

View File

@ -2,8 +2,9 @@ import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react'; import react from '@vitejs/plugin-react';
import fs from 'node:fs'; import fs from 'node:fs';
export default defineConfig({ export default defineConfig(({mode}) => ({
plugins: [react()], plugins: [react()],
...(mode != 'production' && {
server: { server: {
host: 'local.hvatilo.ru', host: 'local.hvatilo.ru',
port: 9876, port: 9876,
@ -12,11 +13,12 @@ export default defineConfig({
key: fs.readFileSync('local.hvatilo.ru-key.pem'), key: fs.readFileSync('local.hvatilo.ru-key.pem'),
}, },
open: '/src/template.html', open: '/src/template.html',
}, }
}),
input: { input: {
main: './src/template.html', main: './src/template.html',
}, },
build: { build: {
outDir: 'dist', outDir: 'dist',
}, },
}); }));