feat: set basePath via config

This commit is contained in:
Mathias Schopmans
2024-03-05 09:50:27 +01:00
committed by Mathias Schopmans
parent 6dd5d5c017
commit a9561a55b4
5 changed files with 18 additions and 11 deletions

15
next.config.js Normal file
View File

@@ -0,0 +1,15 @@
// @ts-check
const config = require("./data/config.json");
const basePath =
config.basePath && config.basePath !== "/" ? config.basePath : "";
/** @type {import("next").NextConfig} */
const nextConfig = {
basePath,
output: "export",
trailingSlash: true,
reactStrictMode: true,
};
module.exports = nextConfig;