-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
38 lines (35 loc) · 936 Bytes
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/** @type {import('next').NextConfig} */
const path = require('path');
const nextConfig = {
pageExtensions: ['page.tsx', 'api.ts'],
reactStrictMode: true,
sassOptions: {
includePaths: [path.join(__dirname, 'styles')],
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'avatars.githubusercontent.com',
},
{
protocol: 'https',
hostname: 'lh3.googleusercontent.com',
},
],
},
webpack: (config) => {
// camel-case style names from css modules
config.module.rules
.find(({ oneOf }) => !!oneOf)
.oneOf.filter(({ use }) => JSON.stringify(use)?.includes('css-loader'))
.reduce((acc, { use }) => acc.concat(use), [])
.forEach(({ options }) => {
if (options.modules) {
options.modules.exportLocalsConvention = 'camelCase';
}
});
return config;
},
};
module.exports = nextConfig;