diff --git a/next.config.js b/next.config.js index a843cbe..be2bc6a 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,17 @@ /** @type {import('next').NextConfig} */ +const urlPrefix = process.env.URL_PREFIX ? '/' + process.env.URL_PREFIX : '' + const nextConfig = { reactStrictMode: true, + assetPrefix: urlPrefix, + basePath: urlPrefix, + trailingSlash: true, + publicRuntimeConfig: { + urlPrefix + }, + images: { + unoptimized: true, + }, } module.exports = nextConfig diff --git a/package.json b/package.json index 313d582..fbd7dc8 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "dev": "next dev", - "build": "next build", + "build": "next build && next export", "start": "next start", "lint": "next lint" },