ionic-team / ionic-team/ionic-cli

Filenames are not the same when building with and without sourcemaps

Ouverte
#4,658 0 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
triage
Langage dominant
TypeScript
Étoiles
2k
Forks
682
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

**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:**

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.