first push Front REACT

This commit is contained in:
2026-05-19 19:50:27 +02:00
parent 4e46d68485
commit c15defa2d4
25 changed files with 3296 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import plugin from '@vitejs/plugin-react'
import fs from 'fs'
import path from 'path'
const certificateName = "reactapp1.client"
const baseFolder =
process.env.APPDATA !== undefined && process.env.APPDATA !== ''
? `${process.env.APPDATA}/ASP.NET/https`
: `${process.env.HOME}/.aspnet/https`
const certFilePath = path.join(baseFolder, `${certificateName}.pem`)
const keyFilePath = path.join(baseFolder, `${certificateName}.key`)
// création certificat uniquement si absent
if (!fs.existsSync(baseFolder)) {
fs.mkdirSync(baseFolder, { recursive: true })
}
export default defineConfig({
plugins: [plugin()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
server: {
https: {
key: fs.readFileSync(keyFilePath),
cert: fs.readFileSync(certFilePath),
},
port: 5173
}
})