How to add Webpack resolve alias for React package - App Router #67071
Unanswered
robertoperez07
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Hi.
I am trying to figure out how to use
webpack.config.resolver.alias
with the App Router.This is a minimal reproducible example for an issue discovered while working on a more complex project with multiple linked npm packages.
react
andreact-dom
paths were added to the Webpack configuration to prevent multiple versions or copies of these packages.On a fresh Next 14 installation, this error is thrown on all routes when a
next.config.js
file with the following configuration is added:Steps to Reproduce
next.config.mjs
file.next.config.js
file.webpack
resolve alias forreact
andreact-dom
.next.config.js
Thanks.
Additional information
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions