forked from aws-amplify/amplify-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
26 lines (23 loc) · 872 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
const path = require('path');
const { patchWebpackConfig } = require('next-global-css');
module.exports = {
reactStrictMode: true,
/**
* Setting trailingSlash to true to resolve known bug with federated sign in redirect + next.js
* https://github.com/aws-amplify/amplify-cli/issues/7359#issuecomment-812821315
*/
trailingSlash: true,
pageExtensions: ['page.tsx'],
webpack: (config, options) => {
// allows importing of css files inside modules
patchWebpackConfig(config, options);
// resolve react and react-dom from project node_modules
config.resolve.alias = {
...config.resolve.alias,
react: path.resolve(__dirname, 'node_modules/react'),
'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),
'react-map-gl': path.resolve(__dirname, 'node_modules/react-map-gl'),
};
return config;
},
};