npm i --save-dev dependency-checker-webpack-plugin
yarn add --dev dependency-checker-webpack-plugin
The plugin will output information in the console and toast of Windows, MacOS or Linux, for this you need to add it as below and add the package names to the dependency list for checking:
webpack.config.js
import DependencyCheckerPlugin from 'dependency-checker-webpack-plugin';
module.exports = {
...
plugins: [new DependencyCheckerPlugin({
depNames: ['dependency-checker-webpack-plugin']
})],
...
};
It will create a notification for dependencies that have new versions.
new DependencyCheckerPlugin({
depNames: array,
options?: object
})
Name | Type | Default | Description |
---|---|---|---|
depNames |
{Array.<string>} |
[''] | Names of packages to be checked |
options.showToast |
{Boolean} |
true | Enable toast of Windows, MacOS or Linux |
options.showConsole |
{Boolean} |
true | Enable notify in console |
options.devServerOnly |
{Boolean} |
true | For DevServer only |
options.disableCertValid |
{Boolean} |
false | NODE_TLS_REJECT_UNAUTHORIZED = 0 or 1 |