Skip to content

Commit

Permalink
Remove alias config causing all Nextjs App directory paths to error (#8)
Browse files Browse the repository at this point in the history
* remove alias causing app dir routes to throw Error: Cannot read properties of null (reading 'useContext')

* remove unused path import from nextjs.config
  • Loading branch information
ZYJLiu authored Aug 12, 2024
1 parent bec827b commit 60cc6eb
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const withBundleAnalyzer = require("@next/bundle-analyzer");
const { i18n } = require("./next-i18next.config");
const rewritesAndRedirectsJson = require("./rewrites-redirects.json");
const { builder } = require("@builder.io/sdk");
const path = require("path");

const securityHeaders = [
{
Expand Down Expand Up @@ -113,12 +112,6 @@ const moduleExports = () => {
);
imageLoaderRule.exclude = /\.inline\.svg$/;

// Alias configuration
config.resolve.alias = {
...config.resolve.alias,
react: path.resolve(__dirname, "node_modules/react"),
};

return config;
},

Expand Down

0 comments on commit 60cc6eb

Please sign in to comment.