From ac2e46d829b9e39d90f7c50bb1e0743fce204c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=92=8C=E9=A2=A8=E3=83=89=E3=83=AC=E3=83=83=E3=82=B7?= =?UTF-8?q?=E3=83=B3=E3=82=B0?= <37681609+CookieRamen@users.noreply.github.com> Date: Sat, 25 Mar 2023 07:15:13 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=93=E3=83=AB=E3=83=89=E6=99=82=E3=81=AB?= =?UTF-8?q?=E9=9D=99=E7=9A=84=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=8C?= =?UTF-8?q?=E5=87=BA=E5=8A=9B=E3=81=95=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- next.config.js | 11 +++++++++++ package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) 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" },