promo! react
This commit is contained in:
parent
8526e66f5c
commit
037681b463
@ -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',
|
||||
},
|
||||
});
|
||||
}));
|
||||
Loading…
Reference in New Issue
Block a user