fix invalid next.config.js options

This commit is contained in:
thatmattlove 2024-05-31 22:56:26 -04:00
parent 4b6e6cba70
commit c8a348ed0f

View file

@ -9,11 +9,14 @@ const nextConfig = {
},
swcMinify: true,
productionBrowserSourceMaps: true,
output: 'export',
};
if (process.env.NODE_ENV === 'production') {
nextConfig.output = 'export';
}
if (process.env.NODE_ENV === 'development') {
nextConfig.rewrites = [
nextConfig.rewrites = async () => [
{ source: '/api/query', destination: `${process.env.HYPERGLASS_URL}api/query` },
{ source: '/images/:image*', destination: `${process.env.HYPERGLASS_URL}images/:image*` },
];