-
Hi all! I'm having issues with workspaces, webpack, and typescript, and I'm totally stumped on what's going on here. I would really appreciate if someone could tell me what's going wrong. Here's the issue: I have a super simple demo webpack project that uses typescript for the webpack config file. If I build the project using webpack ( To reproduce the error:
Thanks so much and I really appreciate any guidance you can offer. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
The issue seems to be related to extending types. So I'm including a file of type definitions and that file then extends existing types. It works fine when I'm not using workspaces. I'm just trying to follow this guide: |
Beta Was this translation helpful? Give feedback.
-
The reason it works without the workspace is explained here https://yarnpkg.com/features/pnp/#different-behaviours-based-on-workspace--not-a-workspace, you can see it fail in your non-workspace version if you add The fix for both is to create a packageExtensions:
"@types/webpack-dev-server@*":
peerDependencies:
"@types/webpack": "*" |
Beta Was this translation helpful? Give feedback.
The reason it works without the workspace is explained here https://yarnpkg.com/features/pnp/#different-behaviours-based-on-workspace--not-a-workspace, you can see it fail in your non-workspace version if you add
pnpFallbackMode: none
to.yarnrc.yml
.The fix for both is to create a
.yarnrc.yml
file with the following content and runningyarn install