single-spa / create-single-spa

https://single-spa.js.org/docs/create-single-spa
Other
128 stars 60 forks source link

Yarn 2+ PnP: Error: systemjs-webpack-interop tried to access webpack... [webpack-config-single-spa] #392

Open lpicchi opened 7 months ago

lpicchi commented 7 months ago

When using Yarn 2+ PnP get error:

Error: systemjs-webpack-interop tried to access webpack (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
Required package: webpack
Ancestor breaking the chain: webpack-config-single-spa@npm:5.3.0

Webpack should be declared as peerDependency in webpack-config-single-spa and all webpack-config-single-spa-* projects

lpicchi commented 7 months ago

In .yarnrc.yml

pnpMode: loose
pnpFallbackMode: dependencies-only