Skip to content

Commit

Permalink
Update next.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sumithemmadi authored Jan 20, 2024
1 parent f29ad81 commit 6a388a9
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
/** @type {import('next').NextConfig} */
const withNextra = require("nextra")({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.tsx",
basePath: "/",
});

module.exports = {
...withNextra(),
const isProduction = process.env.NODE_ENV === "production";
const assetPrefix = isProduction ? "/truecallerjs" : "";

const nextConfig = {
images: {
unoptimized: true,
},
reactStrictMode: true,
swcMinify: true,
trailingSlash: true,
assetPrefix,
basePath: assetPrefix,
output: "export",
};

module.exports = {
...withNextra(),
...nextConfig,
};

0 comments on commit 6a388a9

Please sign in to comment.