pnp-webpack-plugin
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -110,1 +110,5 @@ let pnp; | ||
}; | ||
module.exports.tsLoaderOptions = (options = {}) => pnp ? Object.assign({}, options, { | ||
resolveModuleName: require('ts-pnp').resolveModuleName, | ||
}) : options; |
{ | ||
"name": "pnp-webpack-plugin", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "plug'n'play resolver for Webpack", | ||
@@ -22,3 +22,6 @@ "license": "MIT", | ||
"pnp" | ||
] | ||
], | ||
"dependencies": { | ||
"ts-pnp": "^1.0.0" | ||
} | ||
} |
@@ -50,2 +50,22 @@ # <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 | ||
### `ts-loader` integration | ||
This plugin as an integration to easily add support for TypeScript in your applications through `ts-loader`. In order to do this, just do the following: | ||
```js | ||
const PnpWebpackPlugin = require(`pnp-webpack-plugin`); | ||
module.exports = { | ||
module: { | ||
rules: [{ | ||
test: /\.ts$/, | ||
loader: require.resolve('ts-loader'), | ||
options: PnpWebpackPlugin.tsLoaderOptions(), | ||
}], | ||
}, | ||
}; | ||
``` | ||
If you have any options you want to pass to `ts-loader`, just pass them as parameter of the `tsLoaderOptions` function and it will take care of forwarding them properly. | ||
## License (MIT) | ||
@@ -52,0 +72,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
7546
88
79
1
+ Addedts-pnp@^1.0.0
+ Addedts-pnp@1.2.0(transitive)