angular - Webpack Bundle Analyzer 不适用于 Jhipster Angular 应用程序
问题描述
我正在使用 jhipster 网关应用程序作为微服务的网关。
为了分析我的 webpack 包,我正在尝试以下方法
冉npm install -g webpack-bundle-analyzer
在您的 Angular 应用程序中,运行ng build --stats-json
在这里我收到如下错误
Cannot determine project or target for command.
Error: Cannot determine project or target for command.
at BuildCommand.initialize (C:\Rk\gateway\node_modules\@angular\cli\models\architect-command.js:122:23)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
解决方案
webpack-bundle-analyzer
为构建的 JHipster 应用程序预配置prod
。你可以在webpack.prod.js中找到它的配置。
要查看输出,运行npm run webpack:prod
并打开target/classes/stats.html
(或 inbuild
而不是target
for gradle)
推荐阅读
- matlab - 向具有特定均值的图像添加泊松噪声。
- c# - GStreamer-Sharp - msg.type 抛出异常
- javascript - 将数据从孩子传递给父母,而无需加载事件,这可能在 vue 世界上吗?
- jenkins - 让 Jenkins 管道在 Gitlab ui 中显示为 gitlab 原生管道
- .net - 如何将 ListView ItemTemplate 中的内容向右对齐?
- rfid - Windows Mobile - RFID 阅读器 - IP 30
- android - 如何使用 Fiddler 捕获流量并使用 Jmeter 从没有 wi-fi 的 Android 设备记录流量
- c# - IActionResult 参数未传递
- java - RecyclerView 工具栏上的 NullPointerException
- ajax - Ajax 发布到 aws api-gateway 返回访问控制检查响应