我的构建被破坏了,因为 yarn audit
说我的依赖项存在漏洞:
yarn audit
yarn audit v1.22.5
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ moderate │ Regular expression denial of service │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ glob-parent │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=5.1.2 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ webpack-dev-server │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ webpack-dev-server > chokidar > glob-parent │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/1751 │
└───────────────┴──────────────────────────────────────────────────────────────┘
1 vulnerabilities found - Packages audited: 819
Severity: 1 Moderate
Done in 0.67s.
Exited with code exit status 4
最佳答案
最好的解决方案可能是将 webpack-dev-server 升级到第 4 版。 Chokidar 在那里更新。另外,正如这里提到的,版本 4 现在是 RC,稳定版本将在不久的将来发布。
https://github.com/webpack/webpack-dev-server/issues/3407#issuecomment-884525530
关于javascript - 全局父 : Regular expression denial of service,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67894603/