mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-16 09:11:38 +00:00
Add asset prefix on export
This commit is contained in:
@ -18,6 +18,7 @@
|
|||||||
/**
|
/**
|
||||||
* @type {import('next').NextConfig}
|
* @type {import('next').NextConfig}
|
||||||
*/
|
*/
|
||||||
|
const isExport = process.env.NEXT_BUILD === 'export';
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
/* config options here */
|
/* config options here */
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
@ -25,11 +26,11 @@ const nextConfig = {
|
|||||||
experimental: {
|
experimental: {
|
||||||
// runtime: 'nodejs',
|
// runtime: 'nodejs',
|
||||||
// outputStandalone: true,
|
// outputStandalone: true,
|
||||||
images:
|
images: isExport
|
||||||
process.env.NEXT_BUILD === 'export'
|
|
||||||
? { allowFutureImage: true, unoptimized: true }
|
? { allowFutureImage: true, unoptimized: true }
|
||||||
: { allowFutureImage: true },
|
: { allowFutureImage: true },
|
||||||
},
|
},
|
||||||
|
assetPrefix: isExport ? './' : undefined,
|
||||||
// images:
|
// images:
|
||||||
// process.env.NEXT_BUILD === 'export'
|
// process.env.NEXT_BUILD === 'export'
|
||||||
// ? {
|
// ? {
|
||||||
|
Reference in New Issue
Block a user