Skip to content

Commit

Permalink
Comments on why we have the GH-specific next config
Browse files Browse the repository at this point in the history
  • Loading branch information
marius-mather committed Sep 18, 2024
1 parent 4c275fd commit 2daa2cb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions next_ghpages.config.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import bundleAnalyzer from "@next/bundle-analyzer";
// Deploying to a GH pages site requires setting the basePath option
// (and potentially the assetPrefix option as well), this can't
// be set via CLI so instead we use a separate next.config.mjs file
// that we use during the GitHub action that builds the pages
import createMDX from '@next/mdx'

const withBundleAnalyzer = bundleAnalyzer({enabled: process.env.ANALYZE === 'true'});

/** @type {import('next').NextConfig} */
const nextConfig = {
output: "export",
basePath: "/ace3tool",
assetPrefix: "https://sydney-informatics-hub.github.io/ace3tool/",
assetPrefix: "https://sydney-informatics-hub.github.io/ace3tool",
trailingSlash: true,
images: {unoptimized: true},
pageExtensions: ['md', 'mdx', 'ts', 'tsx'],
Expand All @@ -17,4 +19,4 @@ const withMDX = createMDX({
// Add markdown plugins here, as desired
})

export default withMDX(withBundleAnalyzer(nextConfig));
export default withMDX(nextConfig);

0 comments on commit 2daa2cb

Please sign in to comment.