ionic-team / ionic-team/ionic-cli

Filenames are not the same when building with and without sourcemaps

Aperta
#4,658 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
triage
Lingua principale
TypeScript
Stelle
2k
Fork
682
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.