-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
47 lines (43 loc) · 1.21 KB
/
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
39
40
41
42
43
44
45
46
47
const path = require('path');
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
images: {
unoptimized: true,
domains: ['firebasestorage.googleapis.com']
},
webpack: (config) => {
// Handle Firebase and undici modules
config.module.rules.push({
test: /\.(js|mjs|jsx|ts|tsx)$/,
include: [
/node_modules\/@firebase/,
/node_modules\/firebase/,
/node_modules\/undici/
],
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: [
'@babel/plugin-transform-private-methods',
'@babel/plugin-transform-class-properties',
'@babel/plugin-transform-private-property-in-object'
]
}
}
});
// Configure path aliases
config.resolve.alias = {
...config.resolve.alias,
'@': path.join(__dirname, '.'),
'components': path.join(__dirname, 'components'),
'features': path.join(__dirname, 'features'),
'lib': path.join(__dirname, 'lib'),
'types': path.join(__dirname, 'types'),
'shared': path.join(__dirname, 'shared')
};
return config;
}
}
module.exports = nextConfig