ihm_client/vite.config.ts
2024-10-30 14:12:42 +00:00

42 lines
936 B
TypeScript

import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue'; // or react from '@vitejs/plugin-react' if using React
import wasm from 'vite-plugin-wasm';
import {createHtmlPlugin} from 'vite-plugin-html';
import fs from 'fs'
import path from 'path'
export default defineConfig({
optimizeDeps: {
include: ['qrcode']
},
plugins: [
vue(), // or react() if using React
wasm(),
createHtmlPlugin({
minify: true,
template: 'index.html',
}),
],
build: {
outDir: 'dist',
target: 'esnext',
rollupOptions: {
input: './src/router.ts',
output: {
entryFileNames: 'index.js',
},
},
},
resolve: {
alias: {
'@': '/src',
},
extensions: ['.ts', '.tsx', '.js'],
},
server: {
host: 'localhost',
open: false,
port: 3001,
strictPort: true, // Empêche de changer de port si le 3001 est occupé
},
});