Webpack plugin for Yarn Plug'n'Play (PnP) resolution, version 1.7.0. It integrates PnP into Webpack's resolver and resolveLoader, allowing dependencies to be resolved from zip archives without node_modules. Updated occasionally; key differentiator: enables PnP in Webpack builds where packages are hoisted into compressed archives, avoiding disk I/O for package resolution. Alternatives include manual resolve.alias configuration or disabling PnP.
npm install pnp-webpack-pluginVerified import paths — ran on the pinned version, not inferred.
Shows minimal Webpack config adding PnP resolver for both modules and loaders.
Replace loader name string with require.resolve('loader-name').Consider using @yarnpkg/pnpify or webpack's built-in PnP support.
Always add resolveLoader.plugins with PnpWebpackPlugin.moduleLoader(module).
Use require.resolve('some-loader') in the loader option.Add PnpWebpackPlugin to resolve.plugins in webpack config.
Remove 'new' keyword: resolve: { plugins: [PnpWebpackPlugin] }