webpack-plugin-deps-analyzer
v0.0.7
Published
用于做依赖项的整理优化
Downloads
4
Readme
webpack-plugin-deps-analyzer
用于做依赖项的整理优化
feature
- 收集所有参与编译的文件
- 查看参与编译的依赖版本
- 查找多个版本的依赖
- 查看依赖参与编译的文件个数
usage
import DepsAnalyzer from "webpack-plugin-deps-analyzer";
const webpackConfig = {
plugins: [
new DepsAnalyzer({
outDir: output,
verbose: true,
}),
],
};
配置项
export interface Options {
/**
* json 文件输出路径
*/
outDir?: string;
/**
* 是否打印日志
* @default true
*/
verbose?: boolean;
}
输出 json 文件示例
{
"deps": {
"@adraffy/ens-normalize": ["1.10.1"],
"@coinbase/wallet-sdk": ["3.9.1"],
"@lit/reactive-element": ["1.6.3", "2.0.4"]
},
"files": {
"@adraffy/[email protected]": [
"/projectRoot/node_modules/.pnpm/@[email protected]/node_modules/@adraffy/ens-normalize/dist/index.mjs"
],
"@coinbase/[email protected]": [
"/projectRoot/node_modules/.pnpm/@[email protected]/node_modules/@coinbase/wallet-sdk/dist/assets/wallet-logo.js",
"/projectRoot/node_modules/.pnpm/@[email protected]/node_modules/@coinbase/wallet-sdk/dist/CoinbaseWalletSDK.js",
"/projectRoot/node_modules/.pnpm/@[email protected]/node_modules/@coinbase/wallet-sdk/dist/core/constants.js",
"/projectRoot/node_modules/.pnpm/@[email protected]/node_modules/@coinbase/wallet-sdk/dist/core/error/constants.js",
"/projectRoot/node_modules/.pnpm/@[email protected]/node_modules/@coinbase/wallet-sdk/dist/core/error/errors.js",
"/projectRoot/node_modules/.pnpm/@[email protected]/node_modules/@coinbase/wallet-sdk/dist/core/error/index.js"
]
},
"issuer": {
"@adraffy/[email protected]": "/projectRoot/node_modules/.pnpm/[email protected]/node_modules/ethers/lib.esm/hash/namehash.js",
"@coinbase/[email protected]": "/projectRoot/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]/node_modules/@web3modal/ethers/dist/esm/src/utils/defaultConfig.js",
"@lit/[email protected]": "/projectRoot/node_modules/.pnpm/[email protected]/node_modules/lit/index.js",
"@lit/[email protected]": "/projectRoot/node_modules/.pnpm/[email protected]/node_modules/lit/index.js"
}
}