Ionic 2 - debugging Typescript files using source maps

删除回忆录丶 提交于 2019-12-12 23:02:52

问题


I am using Ionic 2 RC1. I want to know how to include source maps for every .ts file that is transpiled into main.js file and include their mappings in main.js.map.

Somehow when trying to debug the app loaded into an iPad connected to my Mac from Safari, I don't see .map file being loaded/visible in the network tab or resource tab. I turned on Web Inspector on my iPad.

How do I troubleshoot source map missbehaviour and what can I do to make it available in Safari, Chrome and other browsers. Thanks, Rad

Update 1: I am using these npm packages:

"dependencies": {
"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/compiler-cli": "0.6.2",
"@angular/core": "2.0.0",
"@angular/forms": "2.0.0",
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"@angular/platform-server": "2.0.0",
"@ionic/storage": "1.1.6",
"ionic-angular": "2.0.0-rc.1",
"ionic-native": "2.2.3",
"ionicons": "3.0.0",
"rxjs": "5.0.0-beta.12",
"zone.js": "0.6.21"
},
"devDependencies": {
"@ionic/app-scripts": "^0.0.36",
"typescript": "^2.0.3"
},

回答1:


you should use "@ionic/app-scripts": "0.0.36" in your dependencies packages.json file - this should do the work .



来源:https://stackoverflow.com/questions/40372684/ionic-2-debugging-typescript-files-using-source-maps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!