Ionic-app-scripts: Getting source-maps with --prod build?

Created on 24 Aug 2017  路  3Comments  路  Source: ionic-team/ionic-app-scripts

Short description of the problem:

Currently using Sentry for error reporting, and I'm having trouble with my source-maps. I've noticed the main.map.js is removed from the www/build file on --prod builds. I believe I need them to be in the build so I can upload them, so all the paths still match up?

What behavior are you expecting?

I understand source-maps are stripped to reduce the app size. Is it possible however to have them spit out into a different folder rather than deleted towards the end of the build, so they can be uploaded to Sentry?

Steps to reproduce:

  1. ionic cordova build android --prod
  2. No source maps in www/build

Which @ionic/app-scripts version are you using?
2.1.4

Most helpful comment

Seems to have figured this out myself.

"ionic_generate_source_map": "true" added to config {} in package.json

All 3 comments

Seems to have figured this out myself.

"ionic_generate_source_map": "true" added to config {} in package.json

did you mean ionic.config.json ?

@Xample Actually, it needs to be added to the main project's package.json as
"config": { "ionic_generate_source_map": "true" },

Was this page helpful?
0 / 5 - 0 ratings

Related issues

barbsicle picture barbsicle  路  3Comments

NoNameProvided picture NoNameProvided  路  4Comments

nalkon picture nalkon  路  4Comments

loicfavory picture loicfavory  路  4Comments

MarkErik picture MarkErik  路  3Comments