Files
PIbd-24_Boiko_M.S._Internet…/vite.config.js
2025-03-21 21:08:00 +04:00

32 lines
719 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { defineConfig } from 'vite';
import { resolve } from 'path';
// Получаем список HTML-файлов для мультистраничного приложения
const pages = [
'index.html',
'catalog.html',
'films.html',
'seriales.html',
'reviews.html',
'about.html',
'add-movie.html' // Add this line
];
// Создаем объект с входными точками для каждой страницы
const input = {};
pages.forEach(page => {
input[page.replace('.html', '')] = resolve(__dirname, page);
});
export default defineConfig({
root: './',
build: {
outDir: 'dist',
rollupOptions: {
input
}
},
server: {
open: '/index.html'
}
});