2024-12-28 12:23:50 -05:00
|
|
|
import type {NextConfig } from 'next';
|
|
|
|
import NextBundleAnalyzer from '@next/bundle-analyzer';
|
|
|
|
|
|
|
|
let config: NextConfig = {
|
|
|
|
reactStrictMode: true,
|
2023-09-20 00:25:34 -04:00
|
|
|
i18n: {
|
|
|
|
locales: ['en-US'],
|
|
|
|
defaultLocale: 'en-US'
|
|
|
|
},
|
2024-12-28 12:23:50 -05:00
|
|
|
// not sure why this breaks prod build in the latest version
|
|
|
|
// aah it's so frustrating to deal with an warning log that
|
|
|
|
// shows up regardless of the config but its presence halts
|
|
|
|
// the entire thing.
|
2023-09-20 00:25:34 -04:00
|
|
|
webpack: (config, _options) => {
|
|
|
|
config.module.rules.push(
|
|
|
|
{
|
|
|
|
test: /\.svg$/,
|
|
|
|
use: [{ loader: '@svgr/webpack' }],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.md$/,
|
|
|
|
type: 'asset/source',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.otf$/,
|
|
|
|
type: 'asset/resource',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.txt$/,
|
|
|
|
type: 'asset/source',
|
|
|
|
},
|
|
|
|
);
|
|
|
|
|
2024-02-13 18:01:07 -05:00
|
|
|
return config;
|
2023-09-20 00:25:34 -04:00
|
|
|
},
|
2024-02-13 18:01:07 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
if (process.env.ANALYZE) {
|
2024-12-28 12:23:50 -05:00
|
|
|
config = NextBundleAnalyzer({
|
2024-02-13 18:01:07 -05:00
|
|
|
enabled: true
|
2024-12-28 12:23:50 -05:00
|
|
|
})(config);
|
2023-10-30 00:18:38 -04:00
|
|
|
}
|
2024-12-28 12:23:50 -05:00
|
|
|
|
|
|
|
export default config;
|