Skip to content

Commit 12babc2

Browse files
fix: update Next.js config for custom domain CSS loading
- Remove GitHub Pages environment variable dependency - Always use /tools base path in production - Add explicit NODE_ENV in GitHub Actions workflow - Fixes CSS and asset loading on custom domain webcored.com/tools 🧪 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 772353e commit 12babc2

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232

3333
- name: Build
3434
run: npm run build
35+
env:
36+
NODE_ENV: production
3537

3638
- name: Upload artifact
3739
uses: actions/upload-pages-artifact@v3

next.config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
/** @type {import('next').NextConfig} */
22
const isProd = process.env.NODE_ENV === 'production';
3-
const isGitHubPages = process.env.GITHUB_PAGES === 'true';
43

54
const nextConfig = {
65
output: 'export',
76
trailingSlash: true,
8-
basePath: isProd && isGitHubPages ? '/tools' : '',
9-
assetPrefix: isProd && isGitHubPages ? '/tools/' : '',
7+
basePath: isProd ? '/tools' : '',
8+
assetPrefix: isProd ? '/tools/' : '',
109
images: {
1110
unoptimized: true
1211
}

0 commit comments

Comments
 (0)