rozpracovane API a frontend pomocou Vue.js

This commit is contained in:
2025-04-13 01:37:24 +02:00
parent 6dce7184bd
commit ee4729b8ef
23 changed files with 1929 additions and 0 deletions

View File

@ -0,0 +1,23 @@
// generateHtaccess.js
import fs from 'fs';
import path from 'path';
import { baseUrl } from '../vite.config.js';
// Obsah .htaccess súboru
const htaccessContent = `
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase ${baseUrl}
RewriteRule ^index\\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . ${baseUrl}index.html [L]
</IfModule>
`;
// Určte cestu pre vygenerovanie .htaccess do dist/
const distPath = path.join(process.cwd(), 'dist', '.htaccess');
// Zapíšte obsah do súboru .htaccess
fs.writeFileSync(distPath, htaccessContent, 'utf8');
console.log('.htaccess bol úspešne vygenerovaný do dist/');