-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathnext.config.js
180 lines (176 loc) · 5.93 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
const removeImports = require('next-remove-imports')();
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
images: {
domains: [
'avatars.githubusercontent.com',
'dev-to-uploads.s3.amazonaws.com',
'res.cloudinary.com',
'placehold.co',
'media.sproutsocial.com',
'static-assets.amplication.com',
'static-assets.amplication.com.s3.amazonaws.com',
'static-assets.amplication.com.s3.amazonaws.com.',
'*.s3.amazonaws.com',
's3.amazonaws.com',
'www.facebook.com',
'raw.githubusercontent.com',
'amplication.com',
'media.theresanaiforthat.com'
],
},
experimental: { images: { allowFutureImage: true }, optimizeCss: true },
async redirects() {
return [
{
source:
'/blog/amplication--version-1.0-is-now-live-cl89x7w6u726501s6xg825v2x',
destination: '/blog/amplication-version-10-is-now-live',
permanent: true,
},
{
source:
'/blog/how-to-start-your-next-backend-project---boilerplates,-starters-&-frameworks-cl839jv0w1984801s68x3vchwq',
destination:
'/blog/how-to-start-your-next-backend-project-boilerplates-starters-and-frameworks',
permanent: true,
},
{
source:
'/blog/release-0.15.0----support-for-microservices-architecture-cl7dk1vlf3048301s6v7ai22i8',
destination:
'/blog/release-0150-support-for-microservices-architecture',
permanent: true,
},
{
source:
'/blog/an-introduction-to-microservices--cl791368g2447001s6505x8xn1',
destination: '/blog/an-introduction-to-microservices',
permanent: true,
},
{
source:
'/blog/introducing-the-community-champions-program-cl6exyi9q670901s61r3hq9x6',
destination: '/blog/introducing-the-community-champions-program',
permanent: true,
},
{
source:
'/blog/the-long-way-for-creating-a-new-backend-server-cl63wz7el1047801s6jf5k5sh0',
destination: '/blog/the-long-way-for-creating-a-new-backend-server',
permanent: true,
},
{
source:
'/blog/amplication-release-0.14.0---shifting-gears-towards-enterprise-ready-microservices-and-modular-code-cl59il0hn1741401s64lxhij2c',
destination:
'/blog/amplication-release-0140-shifting-gears-towards-enterprise-ready-microservices-and-modular-code',
permanent: true,
},
{
source:
'/blog/why-you-should-choose-nestjs-as-your-backend-framework-cl56jih1t164901s6aowneplb',
destination:
'/blog/why-choose-nestjs-as-your-backend-framework-amplication',
permanent: true,
},
{
source:
'/blog/why-choose-nestjs-as-your-backend-framework---amplication--cl56jih1t164901s6aowneplb',
destination:
'/blog/why-choose-nestjs-as-your-backend-framework-amplication',
permanent: true,
},
{
source:
"/blog/eating-our-own-dog-food---building-amplication's-blog-with-amplication-cl4wnpayg963101s6f7svecil",
destination:
'/blog/eating-our-own-dog-food-building-amplications-blog-with-amplication',
permanent: true,
},
{
source:
'/blog/amplication-release-0.12.7---good-code-and-public-endpoints-cl32wn61z360401s6xbxznyil',
destination:
'/blog/amplication-release-0127-good-code-and-public-endpoints',
permanent: true,
},
{
source:
'/blog/jwt-authentication---what-is-it-and-how-do-you-use-it-with-amplication-cl13ovhku011801s6636zn2u3',
destination:
'/blog/jwt-authentication-what-is-it-and-how-do-you-use-it-with-amplication',
permanent: true,
},
{
source:
'/blog/jwt-authentication---what-is-it-and-how-do-you-use-it-with-amplication%3F-cl13ovhku011801s6636zn2u3',
destination:
'/blog/jwt-authentication-what-is-it-and-how-do-you-use-it-with-amplication',
permanent: true,
},
{
source:
'/blog/build-a-node.js-graphql-api-with-nestjs-and-prisma-ckza2vfrg006801s6me2i2syc',
destination: '/blog/build-a-nodejs-graphql-api-with-nestjs-and-prisma',
permanent: true,
},
{
source:
'/blog/7-key-differences-between-graphql-and-rest-apis-ckza1akvu042701s6jzrjovs5',
destination: '/blog/7-key-differences-between-graphql-and-rest-apis',
permanent: true,
},
{
source:
'/blog/the-open-source-development-platform(.)-introducing-amplication-ckza1a8p0029801s6ly4lbuh5',
destination:
'/blog/the-open-source-development-platform-introducing-amplication',
permanent: true,
},
{
source:
'/blog/introducing-amplication(:)-the-open-source-development-tool-ckza1a8p0029801s6ly4lbuh5',
destination:
'/blog/the-open-source-development-platform-introducing-amplication',
permanent: true,
},
{
source: '/features',
destination: '/developers',
permanent: true,
},
{
source: '/developers',
destination: '/build-new-services',
permanent: true,
},
];
},
swcMinify: true,
webpack: (config, { dev, isServer }) => {
config.module.rules.push({
test: /\.md$/,
use: 'raw-loader',
});
// Use file-loader to load mp4 files.
const prefix = config.assetPrefix ?? config.basePath ?? '';
config.module.rules.push({
test: /\.mp4$/,
use: [
{
loader: 'file-loader',
options: {
publicPath: `${prefix}/_next/static/media/`,
outputPath: `${isServer ? '../' : ''}static/media/`,
name: '[name].[hash].[ext]',
},
},
],
});
return config;
},
};
module.exports = nextConfig;
module.exports = removeImports(nextConfig);