Webpack捆绑分析器无法用于Jhipster Angular应用程序。

问题描述 投票:0回答:1

我正在使用jhipster网关应用程序作为微服务的网关。

为了分析我的webpack bundle,我正在尝试以下方法

小兰 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)
angular webpack jhipster webpack-bundle-analyzer
1个回答
3
投票

webpack-bundle-analyzer 自带的预配置为JHipster的应用程序的 prod 构建。你可以在 webpack.prod.js.

要查看输出,运行 npm run webpack:prod 而开 target/classes/stats.html (或在 build 而不是 target 为gradle)

© www.soinside.com 2019 - 2024. All rights reserved.