Fix react/redux TypeScript build errors caused by breaking changes in dependencies. Fixes #529, #582, #583

This commit is contained in:
SteveSandersonMS
2017-01-16 10:46:28 +00:00
parent 9d5006107f
commit f8714e9653
6 changed files with 28 additions and 8 deletions

View File

@@ -2,6 +2,7 @@
"name": "WebApplicationBasic",
"version": "0.0.0",
"dependencies": {
"@types/history": "^2.0.0",
"@types/react": "^0.14.29",
"@types/react-dom": "^0.14.14",
"@types/react-redux": "^4.4.29",
@@ -39,7 +40,7 @@
"redux-thunk": "^2.1.0",
"style-loader": "^0.13.0",
"ts-loader": "^0.8.1",
"typescript": "2.0.3",
"typescript": "^2.0.3",
"url-loader": "^0.5.7",
"webpack": "^1.13.2",
"webpack-hot-middleware": "^2.12.2",

View File

@@ -10,8 +10,11 @@
"lib": ["es6", "dom"],
"types": [ "webpack-env", "whatwg-fetch" ],
"paths": {
// Fixes "Duplicate identifier 'Redux'" error when packages were installed via Yarn (by specifying which .d.ts file is authoritative)
"redux": ["./node_modules/@types/redux/index"]
// Fix "Duplicate identifier" errors caused by multiple dependencies fetching their own copies of type definitions.
// We tell TypeScript which type definitions module to treat as the canonical one (instead of combining all of them).
"history": ["./node_modules/@types/history/index"],
"redux": ["./node_modules/@types/redux/index"],
"react": ["./node_modules/@types/react/index"]
}
},
"exclude": [