-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
21 lines (18 loc) · 743 Bytes
/
next.config.js
File metadata and controls
21 lines (18 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const withNextIntl = require('next-intl/plugin')('./i18n.ts');
// When deploying to GitHub Pages the site is served from
// https://<user>.github.io/<repo>/, so we need a basePath in production.
// Locally (next dev / next build without GITHUB_PAGES) we leave it empty.
const isGithubPages = process.env.GITHUB_PAGES === 'true';
const repoName = 'global-mobility-consultant';
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
trailingSlash: true,
images: { unoptimized: true },
basePath: isGithubPages ? `/${repoName}` : '',
assetPrefix: isGithubPages ? `/${repoName}/` : '',
env: {
NEXT_PUBLIC_BASE_PATH: isGithubPages ? `/${repoName}` : '',
},
};
module.exports = withNextIntl(nextConfig);