chore(*): remove duplicate cache rule + cleanup cache headers; cleanup + formatting

This commit is contained in:
Cory Dransfeldt 2025-05-17 13:25:40 -07:00
parent 425fed6ff6
commit 0e565970a5
No known key found for this signature in database
42 changed files with 223 additions and 217 deletions

View file

@ -4,9 +4,9 @@ import { minify } from "terser";
export const minifyJsComponents = async () => {
const scriptsDir = "dist/assets/scripts";
const minifyJsFilesInDir = async (dir) => {
const files = fs.readdirSync(dir);
for (const fileName of files) {
const filePath = path.join(dir, fileName);
const stat = fs.statSync(filePath);
@ -16,6 +16,7 @@ export const minifyJsComponents = async () => {
} else if (fileName.endsWith(".js")) {
const fileContent = fs.readFileSync(filePath, "utf8");
const minified = await minify(fileContent);
if (minified.error) {
console.error(`Error minifying ${filePath}:`, minified.error);
} else {