chore: react compiler

This commit is contained in:
iCrawl
2024-05-19 03:34:54 +02:00
parent 555961b3b8
commit bb884fc260
9 changed files with 18529 additions and 14915 deletions

View File

@@ -1,11 +1,7 @@
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({
/**
* @type {import('next').NextConfig}
*/
export default {
reactStrictMode: true,
images: {
dangerouslyAllowSVG: true,
@@ -18,14 +14,8 @@ export default withBundleAnalyzer({
},
},
experimental: {
ppr: false,
},
webpack(config, { isServer }) {
if (!isServer) {
config.plugins.push(localesPlugin.webpack({ locales: ['en-US'] }));
}
return config;
ppr: true,
reactCompiler: true,
},
async redirects() {
return [
@@ -41,4 +31,4 @@ export default withBundleAnalyzer({
},
];
},
});
};