Skip to content

Commit b487fef

Browse files
committed
fix: update basePath and assetPrefix to use conditional logic for production
1 parent af1c20d commit b487fef

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

next.config.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
const path = require('path');
22
const runtimeCaching = require('next-pwa/cache');
3+
4+
const isProduction = process.env.NEXT_ENV === 'PRODUCTION';
5+
const basePath = isProduction ? '/development-tools' : '';
6+
const assetPrefix = isProduction ? '/development-tools' : '';
7+
38
let nextConfig = {
4-
// This tells the app it lives inside this subpath
5-
basePath: '/development-tools',
6-
assetPrefix: '/development-tools',
9+
basePath: basePath,
10+
assetPrefix: assetPrefix,
711
reactStrictMode: true,
812
sassOptions: {
913
includePaths: [path.join(__dirname, 'styles')],

0 commit comments

Comments
 (0)