离子反应构建而无需缩小

发布于 2025-02-08 07:28:38 字数 337 浏览 3 评论 0原文

我正在尝试运行脚本

ionic build

但是生成的构建版本始终具有 - 生产标志。因此,我的JS/TS代码被缩小,不适合调试。您知道在开发模式下构建的一种方法吗?

“ ionic build”的输出

”为VUE工作似乎不起作用。

I am trying to run the script

ionic build

But the generated build version is always with --production flag. Thus my js/ts code is minified and not suitable for debugging. Do you know a way to build in dev mode?

output of "ionic build"

The command "ionic build -- --mode development" which seems to work for Vue does not seem to work for React.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

锦上情书 2025-02-15 07:28:38

Ionic React使用创建React App 在引擎盖下。这意味着您可以使用CRA构建命令代替离子命令。

在此GIST 中描述的“ Nofollow noreferrer”>,您需要启用CRA的cra inmabil for cra for cra for cra inspor cra inspor insif for cra formied unfactied unfact。

您可以使用命令react-scripts构建 - - profile来执行此操作。

为了使其更容易,您可以在package.json.json中添加命令到scripts喜欢:

   "build-profile": "react-scripts build -- --profile",

Ionic React uses Create React App under the hood. This means that you can use CRA build commands instead of Ionic.

As described in this gist, you need to enable profiling mode for CRA to get unminified output.

You can do this with the command react-scripts build -- --profile.

To make it easier, you can add a command to scripts in your package.json like:

   "build-profile": "react-scripts build -- --profile",
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文