You can make a build with sourcemaps like this :
./node_modules/@ionic/app-scripts/bin/ionic-app-scripts.js build --prod --generateSourceMap true
I use this to analyze my source maps via source-map-explorer.
If you create a npm run command in your package.json you don’t have to put the whole path. Hope this works for you.