mirror of
https://github.com/owncast/owncast.git
synced 2025-11-03 13:01:46 +08:00
@ -2,53 +2,63 @@ const withLess = require('next-with-less');
|
|||||||
const withBundleAnalyzer = require('@next/bundle-analyzer')({
|
const withBundleAnalyzer = require('@next/bundle-analyzer')({
|
||||||
enabled: process.env.ANALYZE === 'true',
|
enabled: process.env.ANALYZE === 'true',
|
||||||
});
|
});
|
||||||
|
const withPWA = require('next-pwa')({
|
||||||
|
dest: 'public',
|
||||||
|
register: true,
|
||||||
|
skipWaiting: true,
|
||||||
|
publicExcludes: ['!img/platformlogos/**/*', '!styles/admin/**/*'],
|
||||||
|
buildExcludes: [/chunks\/pages\/admin.*/, '!**/admin/**/*'],
|
||||||
|
sourcemap: process.env.NODE_ENV === 'development',
|
||||||
|
});
|
||||||
|
|
||||||
module.exports = withBundleAnalyzer(
|
module.exports = withPWA(
|
||||||
withLess({
|
withBundleAnalyzer(
|
||||||
productionBrowserSourceMaps: process.env.SOURCE_MAPS === 'true',
|
withLess({
|
||||||
trailingSlash: true,
|
productionBrowserSourceMaps: process.env.SOURCE_MAPS === 'true',
|
||||||
reactStrictMode: true,
|
trailingSlash: true,
|
||||||
images: {
|
reactStrictMode: true,
|
||||||
unoptimized: true,
|
images: {
|
||||||
},
|
unoptimized: true,
|
||||||
swcMinify: true,
|
},
|
||||||
webpack(config) {
|
swcMinify: true,
|
||||||
config.module.rules.push({
|
webpack(config) {
|
||||||
test: /\.svg$/i,
|
config.module.rules.push({
|
||||||
issuer: /\.[jt]sx?$/,
|
test: /\.svg$/i,
|
||||||
use: ['@svgr/webpack'],
|
issuer: /\.[jt]sx?$/,
|
||||||
});
|
use: ['@svgr/webpack'],
|
||||||
|
});
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
async rewrites() {
|
async rewrites() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
source: '/api/:path*',
|
source: '/api/:path*',
|
||||||
destination: 'http://localhost:8080/api/:path*', // Proxy to Backend to work around CORS.
|
destination: 'http://localhost:8080/api/:path*', // Proxy to Backend to work around CORS.
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: '/hls/:path*',
|
source: '/hls/:path*',
|
||||||
destination: 'http://localhost:8080/hls/:path*', // Proxy to Backend to work around CORS.
|
destination: 'http://localhost:8080/hls/:path*', // Proxy to Backend to work around CORS.
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: '/img/:path*',
|
source: '/img/:path*',
|
||||||
destination: 'http://localhost:8080/img/:path*', // Proxy to Backend to work around CORS.
|
destination: 'http://localhost:8080/img/:path*', // Proxy to Backend to work around CORS.
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: '/logo',
|
source: '/logo',
|
||||||
destination: 'http://localhost:8080/logo', // Proxy to Backend to work around CORS.
|
destination: 'http://localhost:8080/logo', // Proxy to Backend to work around CORS.
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: '/thumbnail.jpg',
|
source: '/thumbnail.jpg',
|
||||||
destination: 'http://localhost:8080/thumbnail.jpg', // Proxy to Backend to work around CORS.
|
destination: 'http://localhost:8080/thumbnail.jpg', // Proxy to Backend to work around CORS.
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: '/customjavascript',
|
source: '/customjavascript',
|
||||||
destination: 'http://localhost:8080/customjavascript', // Proxy to Backend to work around CORS.
|
destination: 'http://localhost:8080/customjavascript', // Proxy to Backend to work around CORS.
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
pageExtensions: ['tsx'],
|
pageExtensions: ['tsx'],
|
||||||
}),
|
}),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
1302
web/package-lock.json
generated
1302
web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -35,7 +35,9 @@
|
|||||||
"linkifyjs": "^4.1.0",
|
"linkifyjs": "^4.1.0",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.21",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
|
"next-pwa": "^5.6.0",
|
||||||
"next-with-less": "2.0.5",
|
"next-with-less": "2.0.5",
|
||||||
|
"next-with-workbox": "^3.0.5",
|
||||||
"picmo": "5.8.4",
|
"picmo": "5.8.4",
|
||||||
"postcss-flexbugs-fixes": "5.0.2",
|
"postcss-flexbugs-fixes": "5.0.2",
|
||||||
"prop-types": "15.8.1",
|
"prop-types": "15.8.1",
|
||||||
@ -56,6 +58,8 @@
|
|||||||
"slate-react": "0.94.2",
|
"slate-react": "0.94.2",
|
||||||
"ua-parser-js": "1.0.35",
|
"ua-parser-js": "1.0.35",
|
||||||
"video.js": "^8.3.0",
|
"video.js": "^8.3.0",
|
||||||
|
"workbox-precaching": "^6.5.4",
|
||||||
|
"workbox-window": "^6.5.4",
|
||||||
"xstate": "4.37.2",
|
"xstate": "4.37.2",
|
||||||
"yaml": "2.2.2"
|
"yaml": "2.2.2"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user