mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-15 01:01:43 +10:00
🚀 release: v3.0.0
This commit is contained in:
53
apps/client/next.config.js
Normal file
53
apps/client/next.config.js
Normal file
@ -0,0 +1,53 @@
|
||||
const withPlugins = require('next-compose-plugins');
|
||||
const withNx = require('@nrwl/next/plugins/with-nx');
|
||||
const withBundleAnalyzer = require('@next/bundle-analyzer')({ enabled: process.env.ANALYZE === 'true' });
|
||||
|
||||
const { i18n } = require('./next-i18next.config');
|
||||
|
||||
/**
|
||||
* @type {import('@nrwl/next/plugins/with-nx').WithNxOptions}
|
||||
**/
|
||||
const nextConfig = {
|
||||
i18n,
|
||||
|
||||
nx: {
|
||||
svgr: false,
|
||||
},
|
||||
|
||||
images: {
|
||||
domains: ['localhost', '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' && /(?<!post)css-loader/.test(l.loader)) {
|
||||
if (!l.options.modules) return;
|
||||
const { getLocalIdent, ...others } = l.options.modules;
|
||||
|
||||
l.options = {
|
||||
...l.options,
|
||||
modules: {
|
||||
...others,
|
||||
getLocalIdent: (ctx, localIdentName, localName, options) => {
|
||||
if (localName === 'dark') return localName;
|
||||
|
||||
return getLocalIdent(ctx, localIdentName, localName, options);
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return config;
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = withPlugins([withNx, withBundleAnalyzer], nextConfig);
|
||||
Reference in New Issue
Block a user