build: smaller bundle size for websites

This commit is contained in:
iCrawl
2022-11-28 05:55:08 +01:00
parent 2f4bfedca1
commit 31e67c4316
24 changed files with 199 additions and 97 deletions

View File

@@ -1,10 +1,15 @@
/* eslint-disable tsdoc/syntax */
import { fileURLToPath } from 'node:url';
import bundleAnalyzer from '@next/bundle-analyzer';
const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
});
/**
* @type {import('next').NextConfig}
*/
export default {
export default withBundleAnalyzer({
reactStrictMode: true,
eslint: {
ignoreDuringBuilds: true,
@@ -20,4 +25,4 @@ export default {
dangerouslyAllowSVG: true,
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
},
};
});