-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
43 lines (36 loc) · 1.09 KB
/
next.config.js
File metadata and controls
43 lines (36 loc) · 1.09 KB
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
import path from "node:path";
import { initOpenNextCloudflareForDev } from "@opennextjs/cloudflare";
import { createVanillaExtractPlugin } from "@vanilla-extract/next-plugin";
import images from "./next-image.config.js";
const withVanillaExtract = createVanillaExtractPlugin();
/** @type {import('next').NextConfig} */
const nextConfig = {
swcMinify: true,
images,
webpack: (config) => {
config.module.rules.push({
test: /\.svg$/,
use: [
{
loader: "@svgr/webpack",
options: {
svgo: false,
},
},
],
});
// Add path alias resolution for vanilla-extract
config.resolve.alias = {
...config.resolve.alias,
"@theme": path.resolve("./src/theme"),
"@assets": path.resolve("./src/assets"),
"@hooks": path.resolve("./src/hooks"),
"@components": path.resolve("./src/components"),
"@utils": path.resolve("./src/utils"),
"@adapters": path.resolve("./src/adapters"),
};
return config;
},
};
export default withVanillaExtract(nextConfig);
void initOpenNextCloudflareForDev();