mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
46 lines
983 B
JavaScript
46 lines
983 B
JavaScript
import bundleAnalyzer from '@next/bundle-analyzer';
|
|
import localesPlugin from '@react-aria/optimize-locales-plugin';
|
|
|
|
const withBundleAnalyzer = bundleAnalyzer({
|
|
enabled: process.env.ANALYZE === 'true',
|
|
});
|
|
|
|
export default withBundleAnalyzer({
|
|
reactStrictMode: true,
|
|
images: {
|
|
dangerouslyAllowSVG: true,
|
|
contentDispositionType: 'attachment',
|
|
contentSecurityPolicy: "default-src 'self'; frame-src 'none'; sandbox;",
|
|
},
|
|
logging: {
|
|
fetches: {
|
|
fullUrl: true,
|
|
},
|
|
},
|
|
experimental: {
|
|
ppr: false,
|
|
},
|
|
webpack(config, { isServer }) {
|
|
if (!isServer) {
|
|
// Don't include any locale strings in the client JS bundle.
|
|
config.plugins.push(localesPlugin.webpack({ locales: [] }));
|
|
}
|
|
|
|
return config;
|
|
},
|
|
async redirects() {
|
|
return [
|
|
{
|
|
source: '/static/logo.svg',
|
|
destination: '/logo.svg',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/guide/:path*',
|
|
destination: 'https://next.discordjs.guide/guide/:path*',
|
|
permanent: true,
|
|
},
|
|
];
|
|
},
|
|
});
|