-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
44 lines (43 loc) · 1.33 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
const path = require('path');
module.exports = {
typescript: {
// !! WARN !!
// Dangerously allow production builds to successfully complete even if
// your project has type errors.
// !! WARN !!
ignoreBuildErrors: true,
},
async rewrites() {
return [
{
source: '/public/:path*',
destination: '/:path*',
},
];
},
reactStrictMode: false,
webpack: (config) => {
config.resolve.alias = {
...(config.resolve.alias || {}),
// The following aliases are added to ensure that both the Next.js instance and
// the `veda-ui` library use the same instances of Jotai for state management.
// This resolves the issue of "Detected multiple Jotai instances," which can cause
// unexpected behavior due to multiple instances of Jotai's default store.
// For more details, refer to the GitHub discussion:
// https://github.com/pmndrs/jotai/discussions/2044
jotai: path.resolve(__dirname, 'node_modules', 'jotai'),
'jotai-devtools': path.resolve(
__dirname,
'node_modules',
'jotai-devtools',
),
'jotai-location': path.resolve(
__dirname,
'node_modules',
'jotai-location',
),
'jotai-optics': path.resolve(__dirname, 'node_modules', 'jotai-optics'),
};
return config;
},
};