У меня проблема с отладкой моего приложения ReactNative, написанного на TypeScript, когда я использую WebStorm IDE.
Приложение работает, но когда я ставлю точку останова на render
, код метода никогда не останавливается на нем.
Вот мой tsconfig:
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"sourceMap": true,
"moduleResolution": "node",
"jsx": "react-native",
"outDir": "artifacts",
"rootDir": "src",
"noImplicitAny": false,
"preserveConstEnums": true,
"allowJs": false,
"sourceMap": true,
"noImplicitReturns": true,
"noUnusedParameters": true,
"noUnusedLocals": true
},
"filesGlob": [
"typings/index.d.ts",
"src/**/*.ts",
"src/**/*.tsx"
],
"types": [
"react",
"react-native",
"jest"
],
"exclude": [
"android",
"ios",
"build",
"node_modules"
]
}
и package.json:
{
"name": "untitled2",
"version": "0.0.1",
"private": true,
"scripts": {
"tsc": "tsc",
"start": "node node_modules/react-native/local-cli/cli.js start",
"build": "npm run clean && npm run tsc --",
"test": "jest"
},
"dependencies": {
"react": "16.3.1",
"react-native": "0.55.3",
"inversify": "^4.13.0",
"react-navigation": "^1.5.11"
},
"devDependencies": {
"typescript": "^2.8.3",
"tslint": "^5.9.1",
"@types/react": "^16.3.12",
"babel-jest": "22.4.3",
"babel-preset-react-native": "4.0.0",
"jest": "22.4.3",
"react-test-renderer": "16.3.1"
},
"jest": {
"preset": "react-native",
"testRegex": "artifacts/.+\\.(test|spec).js$",
"coverageDirectory": "coverage",
"coverageReporters": [
"text-summary",
"html"
]
},
"collectCoverageFrom": [
"artifacts/**/*.js",
"!artifacts/**/*.spec.js",
"!artifacts/**/*.index.js"
]
}