ionic-team / ionic-team/ionic-cli

Filenames are not the same when building with and without sourcemaps

未关闭
#4,658 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
triage
主要语言
TypeScript
星标
2k
派生
682
PR 合并指标
30 天内没有已合并 PR

描述

**Description:**

The filenames generated by
`ionic build --prod --source-map`
and
`ionic build --prod`
are not the same.

To give an idea. This is the www folder with `ionic build --prod --source-map`
![image](https://user-images.githubusercontent.com/644550/111912597-aa1b1480-8a6a-11eb-9fab-01b084ae4a0b.png)

And this with `ionic build --prod`
![image](https://user-images.githubusercontent.com/644550/111912608-b56e4000-8a6a-11eb-8a97-00e9c80c421a.png)

As you can see the file names differ. This is especially an issue when using Sentry where the uploaded sourcemaps need to be the same as the filenames in the app packages.

Building the Android build with sourcemaps is an issue, because all .map files becoming part of the APK package which we don't want.

**Steps to Reproduce:**

Build an Ionic project with:
`ionic build --prod --source-map`
and
`ionic build --prod`

**Output:**

**My `ionic info`:**

Ionic CLI : 6.12.4 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.3.4
@angular-devkit/build-angular : 0.1000.8
@angular-devkit/schematics : 10.0.8
@angular/cli : 10.0.8
@ionic/angular-toolkit : 2.3.3

Capacitor:

Capacitor CLI : 2.1.0
@capacitor/core : 2.4.1

Utility:

cordova-res (update available: 0.15.3) : 0.14.0
native-run (update available: 1.3.0) : 0.3.0

System:

NodeJS : v12.13.0 (/usr/local/bin/node)
npm : 6.14.5
OS : macOS Catalina
```

```

**Other Information:**

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。