-
Notifications
You must be signed in to change notification settings - Fork 31
/
next.config.js
39 lines (33 loc) · 948 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
39
/* eslint-disable */
const withVideos = require('next-videos');
const withTM = require('next-transpile-modules')(['redux-persist']);
module.exports = withTM(
withVideos({
images: {
remotePatterns: [],
},
reactStrictMode: true,
// Specify directories for ESLint linting
eslint: {
dirs: ['pages', 'components', 'lib', 'utils', 'hooks'],
},
// Docker support (Standalone output for optimized Docker builds)
output: 'standalone',
// Webpack custom configuration
webpack(config) {
// Add rule for handling SVGs using @svgr/webpack
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
});
// Ensure compatibility with Node modules by handling environment fallbacks
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
net: false,
tls: false,
};
return config;
},
}),
);