const withNx = require('@nrwl/next/plugins/with-nx'); /** * @type {import('@nrwl/next/plugins/with-nx').WithNxOptions} **/ const nextConfig = { i18n: { defaultLocale: 'en', locales: ['en'], }, env: { appUrl: process.env.APP_URL, serverUrl: process.env.SERVER_URL, appVersion: process.env.npm_package_version, googleClientId: process.env.GOOGLE_CLIENT_ID, }, nx: { svgr: false, }, images: { domains: ['www.gravatar.com'], }, // Hack to make Tailwind darkMode 'class' strategy with CSS Modules // Ref: https://github.com/tailwindlabs/tailwindcss/issues/3258#issuecomment-968368156 webpack: (config) => { const rules = config.module.rules.find((r) => !!r.oneOf); rules.oneOf.forEach((loaders) => { if (Array.isArray(loaders.use)) { loaders.use.forEach((l) => { if (typeof l !== 'string' && typeof l.loader === 'string' && /(? { if (localName === 'dark') return localName; return getLocalIdent(ctx, localIdentName, localName, options); }, }, }; } }); } }); return config; }, }; module.exports = withNx(nextConfig);