fix: address reviewer feedback (#37)
- Revert public/ changelog changes (syncChangelogs copies from root) - Replace manual __dirname with import.meta.dirname Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9afe23180f
commit
5493e0c4e2
1 changed files with 3 additions and 5 deletions
|
|
@ -2,17 +2,15 @@ import { defineConfig } from "vite";
|
|||
import react from "@vitejs/plugin-react";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import { copyFileSync } from "fs";
|
||||
import { resolve, dirname } from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
import { resolve } from "path";
|
||||
|
||||
// Sync root CHANGELOG files to public/ so the app always shows the latest version history
|
||||
function syncChangelogs() {
|
||||
const root = import.meta.dirname;
|
||||
const files = ["CHANGELOG.md", "CHANGELOG.fr.md"];
|
||||
for (const file of files) {
|
||||
try {
|
||||
copyFileSync(resolve(__dirname, file), resolve(__dirname, "public", file));
|
||||
copyFileSync(resolve(root, file), resolve(root, "public", file));
|
||||
} catch {
|
||||
// Ignore if source file doesn't exist
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue