2022-04-18 07:32:57 +02:00
|
|
|
const withLess = require('next-with-less');
|
2022-10-28 08:13:07 +02:00
|
|
|
const withBundleAnalyzer = require('@next/bundle-analyzer')({
|
|
|
|
enabled: process.env.ANALYZE === 'true',
|
|
|
|
});
|
2022-04-18 07:32:57 +02:00
|
|
|
|
2022-10-28 08:13:07 +02:00
|
|
|
module.exports = withBundleAnalyzer(
|
|
|
|
withLess({
|
2023-01-09 05:41:46 +01:00
|
|
|
productionBrowserSourceMaps: true,
|
2022-10-28 08:13:07 +02:00
|
|
|
trailingSlash: true,
|
|
|
|
reactStrictMode: true,
|
2022-10-29 05:19:11 +02:00
|
|
|
images: {
|
|
|
|
unoptimized: true,
|
|
|
|
},
|
2023-01-10 09:58:39 +01:00
|
|
|
swcMinify: true,
|
2022-10-28 08:13:07 +02:00
|
|
|
webpack(config) {
|
|
|
|
config.module.rules.push({
|
|
|
|
test: /\.svg$/i,
|
|
|
|
issuer: /\.[jt]sx?$/,
|
|
|
|
use: ['@svgr/webpack'],
|
|
|
|
});
|
2022-05-18 06:20:27 +02:00
|
|
|
|
2022-10-28 08:13:07 +02:00
|
|
|
return config;
|
|
|
|
},
|
|
|
|
async rewrites() {
|
|
|
|
return [
|
|
|
|
{
|
|
|
|
source: '/api/:path*',
|
|
|
|
destination: 'http://localhost:8080/api/:path*', // Proxy to Backend to work around CORS.
|
|
|
|
},
|
|
|
|
{
|
|
|
|
source: '/hls/:path*',
|
|
|
|
destination: 'http://localhost:8080/hls/:path*', // Proxy to Backend to work around CORS.
|
|
|
|
},
|
|
|
|
{
|
|
|
|
source: '/img/:path*',
|
|
|
|
destination: 'http://localhost:8080/img/:path*', // Proxy to Backend to work around CORS.
|
|
|
|
},
|
|
|
|
{
|
|
|
|
source: '/logo',
|
|
|
|
destination: 'http://localhost:8080/logo', // Proxy to Backend to work around CORS.
|
|
|
|
},
|
|
|
|
{
|
|
|
|
source: '/thumbnail.jpg',
|
|
|
|
destination: 'http://localhost:8080/thumbnail.jpg', // Proxy to Backend to work around CORS.
|
|
|
|
},
|
2023-01-19 07:38:24 +01:00
|
|
|
{
|
|
|
|
source: '/customjavascript',
|
|
|
|
destination: 'http://localhost:8080/customjavascript', // Proxy to Backend to work around CORS.
|
|
|
|
},
|
2022-10-28 08:13:07 +02:00
|
|
|
];
|
|
|
|
},
|
|
|
|
pageExtensions: ['tsx'],
|
|
|
|
}),
|
|
|
|
);
|