From aca06bd596d37cd45df99059fa4ade3ee91c0b49 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Thu, 29 Dec 2022 17:24:52 -0500 Subject: [PATCH] Added base path asset prefix --- .drone.yml | 2 ++ next.config.js | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 9a2840d..15b7662 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,6 +25,8 @@ steps: image: node:16 depends_on: - install-deps + environment: + NEXT_PUBLIC_BASE_PATH: / commands: - npm run build diff --git a/next.config.js b/next.config.js index 1f118c4..8791d9d 100644 --- a/next.config.js +++ b/next.config.js @@ -1,5 +1,8 @@ /** @type {import('next').NextConfig} */ const nextConfig = { + basePath: process.env.NEXT_PUBLIC_BASE_PATH, + assetPrefix: process.env.NEXT_PUBLIC_BASE_PATH + "/", + reactStrictMode: true, trailingSlash: true, // This image loader supports `next export`, for optimizing next tags @@ -7,7 +10,6 @@ const nextConfig = { loader: 'akamai', path: '', }, - basePath: process.env.NEXT_PUBLIC_BASE_PATH, } module.exports = nextConfig