forked from TKP1903/Sarvam-Multikart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
52 lines (46 loc) · 1.19 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
48
49
50
51
52
const withImages = require("next-images");
const { withPlugins } = require("next-compose-plugins");
const { default: next } = require("next");
// const nextConfig = {
// env: {
// API_URL: "https://multikart-graphql-dun.vercel.app/server.js",
// },
// // if you want to run with local graphQl un-comment below one and comment the above code
// // env: {
// // API_URL: "http://localhost:4000/graphql",
// // },
// webpack(config, options) {
// config.module.rules.push({
// test: /\.svg$/,
// issuer: {
// test: /\.(js|ts)x?$/,
// },
// use: ["@svgr/webpack"],
// });
// return config;
// },
// };
// module.exports = {swcMinify: true}, withPlugins([withImages], nextConfig);
const nextConfig = {
env: {
API_URL: "http://localhost:4000/graphql",
},
reactStrictMode: true,
webpack(config, options) {
config.module.rules.push({
test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/,
use: {
loader: "url-loader",
options: {
limit: 100000,
},
},
});
return config;
},
};
module.exports = {
images: {
domains: ["picsum.photos", "localhost", "sarvamsafety.com"],
}
};