Skip to content

Commit

Permalink
⚰️ Remove custom-rewrites.js (#460)
Browse files Browse the repository at this point in the history
Remove custom-rewrites.js

Fixes #459

Previously added to reduce Vercel egress from large logo images. No longer needed.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/wei/socialify/issues/459?shareId=XXXX-XXXX-XXXX-XXXX).
  • Loading branch information
wei authored Dec 19, 2024
1 parent 5ae0499 commit 0bce0d1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 45 deletions.
5 changes: 5 additions & 0 deletions .changeset/slow-hotels-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"socialify": patch
---

Remove custom-rewrites.js which was used to handle large logo rewrites for Vercel
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ COPY package.json ./
COPY --from=deps /app/node_modules ./node_modules
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
COPY --from=builder /app/next.config.js /app/custom-rewrites.js ./
COPY --from=builder /app/next.config.js ./

EXPOSE 3000

Expand Down
40 changes: 0 additions & 40 deletions custom-rewrites.js

This file was deleted.

2 changes: 0 additions & 2 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// jest.config.ts
import type { Config } from '@jest/types'
import nextJest from 'next/jest'
import { pathsToModuleNameMapper } from 'ts-jest'
Expand All @@ -16,7 +15,6 @@ const customJestConfig: Config.InitialOptions = {
prefix: '<rootDir>/',
}),
moduleDirectories: ['node_modules', '<rootDir>/'],
modulePathIgnorePatterns: ['<rootDir>/.vercel/'],
testEnvironment: 'jest-environment-jsdom',
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}', '!src/**/*.d.ts'],
testMatch: [
Expand Down
2 changes: 0 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
const CustomRewrites = require('./custom-rewrites')
const { version } = require('./package.json')

/** @type {import('next').NextConfig} */
const nextConfig = {
async rewrites() {
return [
...CustomRewrites,
{
source: '/:_owner/:_name/image',
destination: '/api/image',
Expand Down

0 comments on commit 0bce0d1

Please sign in to comment.