-
-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathnext.config.mjs
More file actions
41 lines (39 loc) · 1005 Bytes
/
next.config.mjs
File metadata and controls
41 lines (39 loc) · 1005 Bytes
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
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
turbopack: {},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "pub-5f7cbdfd9ffa4c838e386788f395f0c4.r2.dev",
},
{
protocol: "https",
hostname: "cms.retroui.dev",
},
{
protocol: "https",
hostname: "avatars.githubusercontent.com",
},
],
},
// Velite integration
webpack: (config) => {
config.plugins.push(new VeliteWebpackPlugin());
return config;
},
};
class VeliteWebpackPlugin {
static started = false;
apply(compiler) {
compiler.hooks.beforeCompile.tapPromise("VeliteWebpackPlugin", async () => {
if (VeliteWebpackPlugin.started) return;
VeliteWebpackPlugin.started = true;
const dev = compiler.options.mode === "development";
const { build } = await import("velite");
await build({ watch: dev, clean: !dev });
});
}
}
export default nextConfig;