Skip to content

Commit

Permalink
Merge pull request #7 from Ixy194194/dev
Browse files Browse the repository at this point in the history
ビルド時に静的ファイルが出力されるように
  • Loading branch information
SanMurakami authored Mar 24, 2023
2 parents b547952 + ac2e46d commit 8fdf7a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"build": "next build && next export",
"start": "next start",
"lint": "next lint"
},
Expand Down

0 comments on commit 8fdf7a9

Please sign in to comment.