diff --git a/next.config.js b/next.config.js index 7df6e95..9801fba 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,10 @@ /** @type {import('next').NextConfig} */ + +const prefix = + process.env.NODE_ENV === "production" + ? "https://team-ollie.github.io/WeCare-FE" + : ""; + const nextConfig = { images: { domains: ["image.tmdb.org"], @@ -16,6 +22,8 @@ const nextConfig = { }, output: "export", distDir: "dist", + basePath: prefix, + trailingSlash: true, }; module.exports = nextConfig; diff --git a/package.json b/package.json index 2e29972..e90f9b0 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "wecare-fe", "version": "0.1.0", "private": true, - "homepage": "https://team-ollie.github.io/WeCare-FE/home", + "homepage": "https://team-ollie.github.io/WeCare-FE/home/", "scripts": { "dev": "next dev", "build": "next build",