pnp-webpack-plugin
Advanced tools
Comparing version 1.0.2 to 1.1.0
13
index.js
@@ -49,2 +49,13 @@ let pnp; | ||
const resolvedHook = resolver.ensureHook(`resolve`); | ||
// Prevents the SymlinkPlugin from kicking in. We need the symlinks to be preserved because that's how we deal with peer dependencies ambiguities. | ||
resolver.getHook(`file`).intercept({ | ||
register: tapInfo => { | ||
return tapInfo.name !== `SymlinkPlugin` ? tapInfo : Object.assign({}, tapInfo, {fn: (request, resolveContext, callback) => { | ||
callback(); | ||
}}); | ||
} | ||
}); | ||
// Register a plugin that will resolve bare imports into the package location on the filesystem before leaving the rest of the resolution to Webpack | ||
resolver.getHook(`before-module`).tapAsync(`PnpResolver`, (requestContext, resolveContext, callback) => { | ||
@@ -77,3 +88,3 @@ let request = requestContext.request; | ||
resolveContext, | ||
callback, | ||
callback | ||
); | ||
@@ -80,0 +91,0 @@ }); |
{ | ||
"name": "pnp-webpack-plugin", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "plug'n'play resolver for Webpack", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -6,2 +6,4 @@ # <img src="https://raw.githubusercontent.com/webpack/media/master/logo/icon-square-small.png" height="40" align="right" /> [Plug'n'Play](https://github.com/yarnpkg/rfcs/pull/101) resolver for Webpack | ||
*This plugin is also available for Jest ([jest-pnp-resolver](https://github.com/arcanis/jest-pnp-resolver)) and Rollup ([rollup-plugin-pnp-resolve](https://github.com/arcanis/rollup-plugin-pnp-resolve))* | ||
## Installation | ||
@@ -8,0 +10,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6732
85
59