-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
58 lines (55 loc) · 1.41 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
53
54
55
56
57
58
const path = require("path");
const { redirects } = require("./data/redirects");
module.exports = {
webpack: (config, options) => {
config.resolve.alias["components"] = path.join(__dirname, "components");
config.resolve.alias["context"] = path.join(__dirname, "context");
config.resolve.alias["data"] = path.join(__dirname, "data");
config.resolve.alias["lib"] = path.join(__dirname, "lib");
config.resolve.alias["styles"] = path.join(__dirname, "styles");
config.resolve.alias["middleware"] = path.join(__dirname, "middleware");
config.module.rules.push({
test: /\.svg$/,
oneOf: [
{
issuer: /\.[jt]sx?$/,
resourceQuery: /url/,
type: "asset/resource",
},
{
issuer: /\.[jt]sx?$/,
use: ["@svgr/webpack"],
},
],
});
return config;
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "platform-lookaside.fbsbx.com",
},
{
protocol: "https",
hostname: "lh3.googleusercontent.com",
},
],
},
env: {
CLOUD_NAME: process.env.CLOUD_NAME,
CLOUD_UPLOAD_PRESET: process.env.CLOUD_UPLOAD_PRESET,
MAPBOX_API_KEY: process.env.MAPBOX_API_KEY,
},
async redirects() {
return redirects;
},
async rewrites() {
return [
{
source: "/profil/:id*",
destination: "/users/:id*",
},
];
},
};