Skip to content

Commit 093d2d0

Browse files
committed
Fix: add webpack alias for @ path resolution in CI
1 parent ceef82a commit 093d2d0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/documentation/next.config.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
*/
2222

2323
import { createMDX } from "fumadocs-mdx/next";
24+
import path from "path";
25+
import { fileURLToPath } from "url";
26+
27+
const __filename = fileURLToPath(import.meta.url);
28+
const __dirname = path.dirname(__filename);
2429

2530
const withMDX = createMDX();
2631

@@ -48,6 +53,11 @@ const config = {
4853
},
4954
// Suppress warnings in webpack
5055
webpack: (config, { isServer }) => {
56+
// Add @ path alias
57+
config.resolve.alias = {
58+
...config.resolve.alias,
59+
'@': path.resolve(__dirname),
60+
};
5161
if (!isServer) {
5262
config.resolve.fallback = {
5363
...config.resolve.fallback,

0 commit comments

Comments
 (0)