parent
44023b8589
commit
149ee5cff0
@ -1,12 +1,7 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
|
||||
const basePath = '/html';
|
||||
|
||||
const nextConfig = {
|
||||
output: 'export',
|
||||
basePath,
|
||||
env: { basePath },
|
||||
...(process.env.NODE_ENV === 'production' ? { distDir: 'html' } : {}),
|
||||
...(process.env.NODE_ENV === 'production' ? { distDir: 'dist' } : {}),
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Image from 'next/image';
|
||||
|
||||
export default function ImageWithBasePath(props: any) {
|
||||
const imgSrc = process.env.NODE_ENV === 'development' ? `${process.env.basePath}/${props?.src || ''}` : props?.src;
|
||||
const imgSrc = props?.src;
|
||||
return <Image {...props} src={imgSrc} alt={props?.alt} />;
|
||||
}
|
||||
|
Loading…
Reference in new issue