Skip to content

Commit 60cc6eb

Browse files
authored
Remove alias config causing all Nextjs App directory paths to error (#8)
* remove alias causing app dir routes to throw Error: Cannot read properties of null (reading 'useContext') * remove unused path import from nextjs.config
1 parent bec827b commit 60cc6eb

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

next.config.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const withBundleAnalyzer = require("@next/bundle-analyzer");
66
const { i18n } = require("./next-i18next.config");
77
const rewritesAndRedirectsJson = require("./rewrites-redirects.json");
88
const { builder } = require("@builder.io/sdk");
9-
const path = require("path");
109

1110
const securityHeaders = [
1211
{
@@ -113,12 +112,6 @@ const moduleExports = () => {
113112
);
114113
imageLoaderRule.exclude = /\.inline\.svg$/;
115114

116-
// Alias configuration
117-
config.resolve.alias = {
118-
...config.resolve.alias,
119-
react: path.resolve(__dirname, "node_modules/react"),
120-
};
121-
122115
return config;
123116
},
124117

0 commit comments

Comments
 (0)