Added base path asset prefix
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Shahan Nedadahandeh 2022-12-29 17:24:52 -05:00
parent 37a4e1b9dc
commit aca06bd596
2 changed files with 5 additions and 1 deletions

View File

@ -25,6 +25,8 @@ steps:
image: node:16 image: node:16
depends_on: depends_on:
- install-deps - install-deps
environment:
NEXT_PUBLIC_BASE_PATH: /
commands: commands:
- npm run build - npm run build

View File

@ -1,5 +1,8 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
assetPrefix: process.env.NEXT_PUBLIC_BASE_PATH + "/",
reactStrictMode: true, reactStrictMode: true,
trailingSlash: true, trailingSlash: true,
// This image loader supports `next export`, for optimizing next <Image /> tags // This image loader supports `next export`, for optimizing next <Image /> tags
@ -7,7 +10,6 @@ const nextConfig = {
loader: 'akamai', loader: 'akamai',
path: '', path: '',
}, },
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
} }
module.exports = nextConfig module.exports = nextConfig