Skip to content

Commit

Permalink
Merge pull request #3 from bchristie-web/develop
Browse files Browse the repository at this point in the history
Manage build config myself.
  • Loading branch information
bchristie authored Jul 3, 2024
2 parents 5dc79ea + d885787 commit 0d423fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@ jobs:
with:
node-version: "20"
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Setup Pages
uses: actions/configure-pages@v5
with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next
- name: Restore cache
uses: actions/cache@v4
with:
Expand Down
14 changes: 8 additions & 6 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,21 @@ const nextConfig = async (phase, { defaultConfig }) => {
};

switch (phase) {
case PHASE_DEVELOPMENT_SERVER:
case PHASE_PRODUCTION_BUILD:
/** @type {import('next').NextConfig} */
const devConfig = {
const prodConfig = {
...sharedConfig,
unoptimized: true,
};
return devConfig;
return prodConfig;
case PHASE_DEVELOPMENT_SERVER:
default:
/** @type {import('next').NextConfig} */
const prodConfig = {
const devConfig = {
...sharedConfig,
};
return prodConfig;
return devConfig;
}
};
}

export default nextConfig;

0 comments on commit 0d423fa

Please sign in to comment.