pnp-webpack-plugin
Advanced tools
Comparing version 1.4.3 to 1.5.0
const path = require(`path`); | ||
const {resolveModuleName} = require(`ts-pnp`); | ||
@@ -143,3 +144,9 @@ let pnp; | ||
module.exports.tsLoaderOptions = (options = {}) => pnp ? Object.assign({}, options, { | ||
resolveModuleName: require('ts-pnp').resolveModuleName, | ||
resolveModuleName: resolveModuleName, | ||
resolveTypeReferenceDirective: resolveModuleName, | ||
}) : options; | ||
module.exports.forkTsCheckerOptions = (options = {}) => pnp ? Object.assign({}, options, { | ||
resolveModuleNameModule: require.resolve(`./ts`), | ||
resolveTypeReferenceDirectiveModule: require.resolve(`./ts`), | ||
}) : options; |
{ | ||
"name": "pnp-webpack-plugin", | ||
"version": "1.4.3", | ||
"version": "1.5.0", | ||
"description": "plug'n'play resolver for Webpack", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -62,3 +62,5 @@ # <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 | ||
loader: require.resolve('ts-loader'), | ||
options: PnpWebpackPlugin.tsLoaderOptions(), | ||
options: PnpWebpackPlugin.tsLoaderOptions({ | ||
// ... regular options go there ... | ||
}), | ||
}], | ||
@@ -71,2 +73,19 @@ }, | ||
## `fork-ts-checker-webpack-plugin` integration | ||
We also provide an integration for `fork-ts-checker-webpack-plugin`, in a similar way to what we do with `ts-loader`. Here's an example: | ||
```js | ||
const ForkTsCheckerWebpackPlugin = require(`fork-ts-checker-webpack-plugin`); | ||
const PnpWebpackPlugin = require(`pnp-webpack-plugin`); | ||
module.exports = { | ||
plugins: [ | ||
new ForkTsCheckerWebpackPlugin(PnpWebpackPlugin.forkTsCheckerOptions({ | ||
// ... regular options go there ... | ||
}), | ||
], | ||
}; | ||
``` | ||
## License (MIT) | ||
@@ -73,0 +92,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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
12290
8
180
98
9