Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
import path from "path";
import { NextConfig } from "next";

const config: NextConfig = {
reactStrictMode: true,
webpack: (config) => {
// When using `pnpm link` for local SDK development, webpack may resolve
// react/react-dom from the linked package's node_modules (different version),
// causing the "two Reacts" problem. Force resolution to this project's copy.
config.resolve = {
...config.resolve,
alias: {
...config.resolve?.alias,
react: path.resolve("./node_modules/react"),
"react-dom": path.resolve("./node_modules/react-dom"),
},
};
return config;
},
Comment on lines +6 to +19
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: maybe we should also add this to saleor/apps monorepo as shared config?

};

export default config;