owncast/web/next.config.js

40 lines
1 KiB
JavaScript
Raw Normal View History

const withLess = require('next-with-less');
module.exports = withLess({
2020-11-09 23:06:28 +03:00
trailingSlash: true,
webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: ['@svgr/webpack'],
});
return config;
},
async rewrites() {
return [
{
source: '/api/:path*',
destination: 'http://localhost:8080/api/:path*', // Proxy to Backend to work around CORS.
},
2022-05-11 01:36:09 +03:00
{
source: '/hls/:path*',
destination: 'http://localhost:8080/hls/:path*', // Proxy to Backend to work around CORS.
},
2022-05-17 07:44:09 +03:00
{
source: '/img/:path*',
2022-05-27 04:59:16 +03:00
destination: 'http://localhost:8080/img/:path*', // Proxy to Backend to work around CORS.
2022-05-17 07:44:09 +03:00
},
2022-05-11 01:36:09 +03:00
{
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.
},
];
},
2022-09-09 07:43:32 +03:00
pageExtensions: ['tsx'],
});