Ionic-framework: main.js.map not found in prod build

Created on 30 Mar 2017  路  4Comments  路  Source: ionic-team/ionic-framework

hi i have posted this issue there, any idea ?
https://github.com/driftyco/ionic-app-scripts/issues/805

Most helpful comment

This is the issue!, that on my prod build the app do not initialize and when debugging on console it says
file:///var/containers/Bundle/Application/39C211E1-ACD2-4798-96FF-8909F63DB55A/TestApp.app/www/build/main.js.map Failed to load resource: The requested URL was not found on this server.

i know prod builds should not produce map sources and thats why im reporting this case !

Thanks

All 4 comments

Hello, thanks for using Ionic! We do not generate source maps in a prod build as they would add to the size of the app and therefore have a negative impact on performance. I am going to close this one as a duplicate of driftyco/ionic-app-scripts#805.

This is the issue!, that on my prod build the app do not initialize and when debugging on console it says
file:///var/containers/Bundle/Application/39C211E1-ACD2-4798-96FF-8909F63DB55A/TestApp.app/www/build/main.js.map Failed to load resource: The requested URL was not found on this server.

i know prod builds should not produce map sources and thats why im reporting this case !

Thanks

workaround:

package.json:
"ionic_uglifyjs": "./...../uglifyjs.config.js"
add "sourceMapUrl: false" to your uglifyjs.config.js

in node_modules/@ionic/app-scripts/dist/uglifyjs.js line 58
add "sourceMapUrl: uglifyJsConfig.sourceMapUrl"

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings